diff options
author | Steven Bosscher <stevenb@suse.de> | 2005-10-24 19:20:38 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2005-10-24 19:20:38 +0000 |
commit | 7ffc0411cc7a2dce0d2c667dd1e252c5f0eecc2f (patch) | |
tree | 78d749862fc5fc748bcc0b95c662c0ae14a9f3ed /gcc/testsuite/gcc.dg | |
parent | 77c4f044f6ed9067a72d516bc6b40728fb9756eb (diff) | |
download | gcc-7ffc0411cc7a2dce0d2c667dd1e252c5f0eecc2f.zip gcc-7ffc0411cc7a2dce0d2c667dd1e252c5f0eecc2f.tar.gz gcc-7ffc0411cc7a2dce0d2c667dd1e252c5f0eecc2f.tar.bz2 |
re PR tree-optimization/24225 (ICE: segmentation fault in profile.c:branch_prob)
PR tree-optimization/24225
gcc/
* profile.c (branch_prob): Look from end to start through a
basic block when looking for a locus.
testsuite/
* gcc.dg/pr24225.c: New test.
From-SVN: r105857
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-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 0000000..b364f82 --- /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; + } +} |