aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr87117-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr87117-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr87117-1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr87117-1.c b/gcc/testsuite/gcc.dg/pr87117-1.c
new file mode 100644
index 00000000000..06d700871be
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr87117-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-inline -fno-tree-dce" } */
+
+int a, b, c;
+long *d;
+void fn1()
+{
+ for (; 0 < a;)
+ a++;
+}
+void fn3()
+{
+ for (; c; c++)
+ d[c] = 0;
+}
+void fn2()
+{
+ if (b)
+ fn3();
+ fn1();
+}