re PR tree-optimization/59387 (wrong code (hangs) at -Os on x86_64-linux-gnu)
authorJakub Jelinek <jakub@gcc.gnu.org>
Thu, 16 Jan 2014 19:14:49 +0000 (20:14 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 16 Jan 2014 19:14:49 +0000 (20:14 +0100)
PR tree-optimization/59387
* gcc.c-torture/execute/pr59387.c: New test.

From-SVN: r206678

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

diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59387.c b/gcc/testsuite/gcc.c-torture/execute/pr59387.c
new file mode 100644 (file)
index 0000000..e226cf1
--- /dev/null
@@ -0,0 +1,19 @@
+/* PR tree-optimization/59387 */
+
+int a, *d, **e = &d, f;
+char c;
+struct S { int f1; } b;
+
+int
+main ()
+{
+  for (a = -19; a; a++)
+    {
+      for (b.f1 = 0; b.f1 < 24; b.f1++)
+       c--;
+      *e = &f;
+      if (!d)
+       return 0;
+    }
+  return 0;
+}