re PR middle-end/77766 (wrong code at -O2 and -O3 in 64-bit mode on x86_64-linux...
authorJeff Law <law@redhat.com>
Tue, 10 Jan 2017 20:55:59 +0000 (13:55 -0700)
committerJeff Law <law@gcc.gnu.org>
Tue, 10 Jan 2017 20:55:59 +0000 (13:55 -0700)
PR tree-optimization/77766
PR tree-optimization/78856
* gcc.c-torture/execute/pr77766.c: New test.

From-SVN: r244287

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/pr77766.c [new file with mode: 0644]

index bc86b4f37de3d569ca9594e03f5a963c5318bdeb..009d32d730adcd10e92f046c4b4c6d4729fd129a 100644 (file)
@@ -1,3 +1,9 @@
+2017-01-10  Jeff Law  <law@redhat.com>
+
+       PR tree-optimization/77766
+       PR tree-optimization/78856
+       * gcc.c-torture/execute/pr77766.c: New test.
+
 2016-01-10  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/79034
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr77766.c b/gcc/testsuite/gcc.c-torture/execute/pr77766.c
new file mode 100644 (file)
index 0000000..f8f61ad
--- /dev/null
@@ -0,0 +1,28 @@
+char a;
+short b, d = 5, h;
+char c[1];
+int e, f = 4, g, j;
+int main() {
+  int i;
+  for (; f; f = a) {
+    g = 0;
+    for (; g <= 32; ++g) {
+      i = 0;
+      for (; i < 3; i++)
+        while (1 > d)
+          if (c[b])
+            break;
+    L:
+      if (j)
+        break;
+    }
+  }
+  e = 0;
+  for (; e; e = 0) {
+    d++;
+    for (; h;)
+      goto L;
+  }
+  return 0;
+}
+