xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/gcc.dg/loop-4.c (revision 4e43c760ad4cd5f644ec700462679d05749498d8)
1 /* PR optimization/11841 */
2 /* Originator: Andrey Panov <panov@canopus.iacp.dvo.ru> */
3 /* Reduced testcase by Volker Reichelt <reichelt@igpm.rwth-aachen.de> */
4 
5 /* Verify that the (old) loop unroller doesn't wrongly mark a pseudo
6    referenced in a note as local.  */
7 
8 /* { dg-do run } */
9 /* { dg-options "-O2 -funroll-loops" } */
10 
11 int *a;
12 
main()13 int main()
14 {
15   double d[6];
16   int i, j;
17 
18   for (i=0; i<4; ++i)
19     for (j=0; j<3; ++j)
20       d[i+j] = 0;
21 
22   a = &i;
23 
24   return 0;
25 }
26