From 719df717e2b92a90e53f2ecbfdca858440d08fd0 Mon Sep 17 00:00:00 2001 From: Volker Reichelt Date: Mon, 17 May 2004 20:53:55 +0000 Subject: [PATCH] * gcc.dg/loop-4.c: New test. From-SVN: r81946 --- gcc/testsuite/gcc.dg/loop-4.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/loop-4.c diff --git a/gcc/testsuite/gcc.dg/loop-4.c b/gcc/testsuite/gcc.dg/loop-4.c new file mode 100644 index 00000000000..c83fd1c0fc5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/loop-4.c @@ -0,0 +1,25 @@ +/* PR optimization/11841 */ +/* Originator: Andrey Panov */ +/* Reduced testcase by Volker Reichelt */ + +/* 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; +} -- 2.30.2