re PR tree-optimization/87645 (gcc hangs up on vr_values::vrp_visit_assignment_or_call)
authorRichard Biener <rguenther@suse.de>
Fri, 19 Oct 2018 14:28:43 +0000 (14:28 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 19 Oct 2018 14:28:43 +0000 (14:28 +0000)
2018-10-19  Richard Biener  <rguenther@suse.de>

PR middle-end/87645
* gcc.dg/torture/pr87645.c: New testcase.

From-SVN: r265317

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr87645.c [new file with mode: 0644]

index 4fd3f91c860f25f39771b85cfca67c3129397a66..45b9bce96fe736c61d7036e0aa521cc071e236d6 100644 (file)
@@ -1,3 +1,8 @@
+2018-10-19  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/87645
+       * gcc.dg/torture/pr87645.c: New testcase.
+
 2018-10-19  Richard Biener  <rguenther@suse.de>
 
        PR target/87657
diff --git a/gcc/testsuite/gcc.dg/torture/pr87645.c b/gcc/testsuite/gcc.dg/torture/pr87645.c
new file mode 100644 (file)
index 0000000..5360e38
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+typedef unsigned a[8];
+a b, g;
+int c, d, e, f;
+int h() {
+    unsigned i = 2;
+    for (; i < 8; i++)
+      b[i] = 0;
+    for (; f;) {
+       d = 1;
+       for (; d < 14; d += 3) {
+           e = 0;
+           for (; e < 8; e++) {
+               i = 2;
+               for (; i < 8; i++)
+                 b[i] = 5 - (c - g[e] + b[i]);
+           }
+       }
+    }
+}