Hi!

This PR has been fixed recently by PR56988 fix, but adding the testcase
IMHO doesn't hurt.  Committed to trunk/4.8.

2013-05-21  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/57321
        * gcc.c-torture/execute/pr57321.c: New test.

--- gcc/testsuite/gcc.c-torture/execute/pr57321.c.jj    2013-05-21 
09:43:48.099364022 +0200
+++ gcc/testsuite/gcc.c-torture/execute/pr57321.c       2013-05-21 
09:43:30.000000000 +0200
@@ -0,0 +1,24 @@
+/* PR tree-optimization/57321 */
+
+int a = 1, *b, **c;
+
+static int
+foo (int *p)
+{
+  if (*p == a)
+    {
+      int *i[7][5] = { { 0 } };
+      int **j[1][1];
+      j[0][0] = &i[0][0];
+      *b = &p != c;
+    }
+  return 0;
+}
+
+int
+main ()
+{
+  int i = 0;
+  foo (&i);
+  return 0;
+}

        Jakub

Reply via email to