summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr105218.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr105218.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr105218.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr105218.c b/gcc/testsuite/gcc.dg/pr105218.c
new file mode 100644
index 00000000000..0070057c32d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr105218.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/105218 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+int a, c;
+void bar (void);
+
+void
+foo (void)
+{
+ int b = 131;
+ if (a)
+ b = c == 2 ? 1 : c;
+ while (b)
+ bar ();
+}