gcc/testsuite/gcc.dg/pr83323.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-O3 -floop-unroll-and-jam --param unroll-jam-min-percent=0" } */ |
| 3 | int x[1024], y[1024]; |
| 4 | |
| 5 | void __attribute__((noipa)) foo () |
| 6 | { |
| 7 | for (int i = 0; i < 1024; ++i) |
| 8 | { |
| 9 | x[i] = 0; |
| 10 | for (int j = 0; j < 1024; ++j) |
| 11 | if (!y[j]) |
| 12 | x[i] = 1; |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | int main() |
| 17 | { |
| 18 | y[1023] = 1; |
| 19 | foo (); |
| 20 | if (x[1] != 1) |
| 21 | __builtin_abort (); |
| 22 | return 0; |
| 23 | } |