aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr81799.c25
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8995806..9309b48 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-14 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/81799
+ * gcc.dg/tree-ssa/pr81799.c: New.
+
2017-08-14 Wilco Dijkstra <wdijkstr@arm.com>
PR middle-end/46932
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr81799.c b/gcc/testsuite/gcc.dg/tree-ssa/pr81799.c
new file mode 100644
index 0000000..543ae94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr81799.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int printf (const char *, ...);
+
+int a, c[1], d, e, **f;
+
+void fn1 (int h)
+{
+ int *i = 0;
+ for (d = 0; d < 1; d++)
+ {
+ if (d)
+ continue;
+ for (; e; e++)
+ {
+ a = c[*i];
+ if (h)
+ printf ("0");
+ }
+ return;
+ }
+ f = &i;
+}
+