gcc/testsuite/gcc.dg/loop-4.c
raw| 1 | /* PR optimization/11841 */ |
| 2 | /* Originator: Andrey Panov <[email protected]> */ |
| 3 | /* Reduced testcase by Volker Reichelt <[email protected]> */ |
| 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 | |
| 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 | } |