gcc/testsuite/gcc.c-torture/execute/pr97421-1.c
raw| 1 | /* PR rtl-optimization/97421 */ |
| 2 | /* { dg-additional-options "-fmodulo-sched" } */ |
| 3 | |
| 4 | int a, b, d, e; |
| 5 | int *volatile c = &a; |
| 6 | |
| 7 | __attribute__((noinline)) |
| 8 | void f(void) |
| 9 | { |
| 10 | for (int g = 2; g >= 0; g--) { |
| 11 | d = 0; |
| 12 | for (b = 0; b <= 2; b++) |
| 13 | ; |
| 14 | e = *c; |
| 15 | } |
| 16 | } |
| 17 | |
| 18 | int main(void) |
| 19 | { |
| 20 | f(); |
| 21 | if (b != 3) |
| 22 | __builtin_abort(); |
| 23 | } |