Patchwork Testcase for PR51238

login
register
mail settings
Submitter Richard Guenther
Date Dec. 5, 2012, 10:08 a.m.
Message ID <alpine.LNX.2.00.1212051107490.5397@zhemvz.fhfr.qr>
Download mbox | patch
Permalink /patch/203815/
State New
Headers show

Comments

Richard Guenther - Dec. 5, 2012, 10:08 a.m.
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.

Patch

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