summaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-04 12:06:17 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-04 12:06:17 +0000
commitbd9ba7ad5750848b2872e1761e396c73a60a94c2 (patch)
treed8d848361db6b3296dd9c34a27afc087fb8ba008 /gcc/tree-cfgcleanup.c
parent934ca5fdf022cfa63de20487cdee1e57152b4e58 (diff)
downloadgcc-bd9ba7ad5750848b2872e1761e396c73a60a94c2.tar.gz
2011-07-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/49615 * tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Fix basic-block index check. * g++.dg/torture/pr49615.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175803 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r--gcc/tree-cfgcleanup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 1036e1e98f3..0c8c0852024 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -599,7 +599,7 @@ split_bbs_on_noreturn_calls (void)
BB is present in the cfg. */
if (bb == NULL
|| bb->index < NUM_FIXED_BLOCKS
- || bb->index >= n_basic_blocks
+ || bb->index >= last_basic_block
|| BASIC_BLOCK (bb->index) != bb
|| !gimple_call_noreturn_p (stmt))
continue;