public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] tree-optimization/108855 - new testcase
@ 2023-02-21  9:32 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2023-02-21  9:32 UTC (permalink / raw)
  To: gcc-patches

New testcase for the fixed bug.

Pushed.

	PR tree-optimization/108855
	* gcc.dg/pr108855.c: New testcase.
---
 gcc/testsuite/gcc.dg/pr108855.c | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 gcc/testsuite/gcc.dg/pr108855.c

diff --git a/gcc/testsuite/gcc.dg/pr108855.c b/gcc/testsuite/gcc.dg/pr108855.c
new file mode 100644
index 00000000000..f79638f692f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr108855.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+int m;
+
+int
+undefined (int);
+
+__attribute__ ((pure, returns_twice)) int
+bar (void)
+{
+  m = 1;
+  while (m)
+    m = 2;
+
+  return m;
+}
+
+int
+foo (void)
+{
+  return undefined (bar ());
+}
-- 
2.35.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-21  9:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-21  9:32 [PATCH] tree-optimization/108855 - new testcase Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).