gcc/testsuite/gcc.target/arm/pure-code/pr98998.c
raw| 1 | /* PR target/98998 */ |
| 2 | /* { dg-do compile { target fstack_protector } } */ |
| 3 | /* { dg-options "-mpure-code -fstack-protector" } */ |
| 4 | |
| 5 | void *volatile p; |
| 6 | |
| 7 | int |
| 8 | main () |
| 9 | { |
| 10 | int n = 0; |
| 11 | lab:; |
| 12 | int x[n % 1000 + 1]; |
| 13 | x[0] = 1; |
| 14 | x[n % 1000] = 2; |
| 15 | p = x; |
| 16 | n++; |
| 17 | if (n < 1000000) |
| 18 | goto lab; |
| 19 | return 0; |
| 20 | } |