gcc/testsuite/gcc.dg/pr24225.c
raw| 1 | /* This was an ICE caused by the compiler-generated stack save/restore |
| 2 | statements around s[b]. */ |
| 3 | /* { dg-do compile } */ |
| 4 | /* { dg-options "-O1 -fprofile-arcs" } */ |
| 5 | /* { dg-require-profiling "-fprofile-generate" } */ |
| 6 | |
| 7 | int |
| 8 | foo (int a, int b) |
| 9 | { |
| 10 | if (a) |
| 11 | return 1; |
| 12 | { |
| 13 | int s [b]; |
| 14 | return 0; |
| 15 | } |
| 16 | } |