This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Testcase for PR51238
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 5 Dec 2012 11:08:11 +0100 (CET)
- Subject: [PATCH] Testcase for PR51238
Which is fixed on trunk.
Committed.
Richard.
2012-12-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/51238
* gcc.dg/torture/pr51238.c: New testcase.
Index: gcc/testsuite/gcc.dg/torture/pr51238.c
===================================================================
--- gcc/testsuite/gcc.dg/torture/pr51238.c (revision 0)
+++ gcc/testsuite/gcc.dg/torture/pr51238.c (working copy)
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-ftree-loop-distribution" } */
+
+extern int ia[];
+extern int ib[];
+int i;
+
+void
+foo (int l)
+{
+ while (l--)
+ {
+ i = ia[l];
+ ia[l] = ib[l] = 0;
+ }
+}