diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr24225.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr24225.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr24225.c b/gcc/testsuite/gcc.dg/pr24225.c new file mode 100644 index 000000000..4161c31bf --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr24225.c @@ -0,0 +1,15 @@ +/* This was an ICE caused by the compiler-generated stack save/restore + statements around s[b]. */ +/* { dg-do compile } */ +/* { dg-options "-O1 -fprofile-arcs" } */ + +int +foo (int a, int b) +{ + if (a) + return 1; + { + int s [b]; + return 0; + } +} |