gcc/testsuite/gcc.c-torture/execute/pr43220.c
raw| 1 | /* { dg-require-effective-target int32plus } */ |
| 2 | |
| 3 | void *volatile p; |
| 4 | |
| 5 | int |
| 6 | main (void) |
| 7 | { |
| 8 | int n = 0; |
| 9 | lab:; |
| 10 | { |
| 11 | int x[n % 1000 + 1]; |
| 12 | x[0] = 1; |
| 13 | x[n % 1000] = 2; |
| 14 | p = x; |
| 15 | n++; |
| 16 | } |
| 17 | |
| 18 | { |
| 19 | int x[n % 1000 + 1]; |
| 20 | x[0] = 1; |
| 21 | x[n % 1000] = 2; |
| 22 | p = x; |
| 23 | n++; |
| 24 | } |
| 25 | |
| 26 | if (n < 1000000) |
| 27 | goto lab; |
| 28 | |
| 29 | return 0; |
| 30 | } |