aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Reichelt <reichelt@igpm.rwth-aachen.de>2004-05-17 20:53:55 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2004-05-17 20:53:55 +0000
commit719df717e2b92a90e53f2ecbfdca858440d08fd0 (patch)
treef7cbb5576f892883e794f0cbf705b7d368e9d7b9
parente1564e1d4e05b2d10c9cfb1273a2680a3f0f4dba (diff)
downloadgcc-719df717e2b92a90e53f2ecbfdca858440d08fd0.zip
gcc-719df717e2b92a90e53f2ecbfdca858440d08fd0.tar.gz
gcc-719df717e2b92a90e53f2ecbfdca858440d08fd0.tar.bz2
* gcc.dg/loop-4.c: New test.
From-SVN: r81946
-rw-r--r--gcc/testsuite/gcc.dg/loop-4.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/loop-4.c b/gcc/testsuite/gcc.dg/loop-4.c
new file mode 100644
index 0000000..c83fd1c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/loop-4.c
@@ -0,0 +1,25 @@
+/* PR optimization/11841 */
+/* Originator: Andrey Panov <panov@canopus.iacp.dvo.ru> */
+/* Reduced testcase by Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
+
+/* Verify that the (old) loop unroller doesn't wrongly mark a pseudo
+ referenced in a note as local. */
+
+/* { dg-do run } */
+/* { dg-options "-O2 -funroll-loops" } */
+
+int *a;
+
+int main()
+{
+ double d[6];
+ int i, j;
+
+ for (i=0; i<4; ++i)
+ for (j=0; j<3; ++j)
+ d[i+j] = 0;
+
+ a = &i;
+
+ return 0;
+}