diff options
author | Richard Biener <rguenther@suse.de> | 2016-06-09 11:36:22 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-06-09 11:36:22 +0000 |
commit | 36d579866680fd2b45800b072527a9cce93235d0 (patch) | |
tree | c028de2d47057c578a04ccd9b7a702936daa9cd4 /gcc/tree-ssa-loop-manip.c | |
parent | 28cd6814b5bf87cb65505df85c326f7a1975a60d (diff) | |
download | gcc-36d579866680fd2b45800b072527a9cce93235d0.zip gcc-36d579866680fd2b45800b072527a9cce93235d0.tar.gz gcc-36d579866680fd2b45800b072527a9cce93235d0.tar.bz2 |
re PR tree-optimization/71462 (gcc ICE at -O3 on valid code on x86_64-linux-gnu with “seg fault”)
2016-06-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/71462
* tree-ssa-loop-manip.c (find_uses_to_rename): Guard against
removed blocks.
* gcc.dg/torture/pr71462.c: New testcase.
From-SVN: r237254
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
-rw-r--r-- | gcc/tree-ssa-loop-manip.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c index 77c5eb4..e87d290 100644 --- a/gcc/tree-ssa-loop-manip.c +++ b/gcc/tree-ssa-loop-manip.c @@ -472,8 +472,11 @@ find_uses_to_rename (bitmap changed_bbs, bitmap *use_blocks, bitmap need_phis, if (changed_bbs) EXECUTE_IF_SET_IN_BITMAP (changed_bbs, 0, index, bi) - find_uses_to_rename_bb (BASIC_BLOCK_FOR_FN (cfun, index), use_blocks, - need_phis, use_flags); + { + bb = BASIC_BLOCK_FOR_FN (cfun, index); + if (bb) + find_uses_to_rename_bb (bb, use_blocks, need_phis, use_flags); + } else FOR_EACH_BB_FN (bb, cfun) find_uses_to_rename_bb (bb, use_blocks, need_phis, use_flags); |