Patchwork [committed] Add testcase from PR57321

login
register
mail settings
Submitter Jakub Jelinek
Date May 21, 2013, 7:59 a.m.
Message ID <20130521075928.GR1377@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/245218/
State New
Headers show

Comments

Jakub Jelinek - May 21, 2013, 7:59 a.m.
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  <jakub@redhat.com>

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


	Jakub

Patch

--- 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;
+}