diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-02-07 18:45:57 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-02-07 18:45:57 +0100 |
commit | ec48209a6c124fea6ff7467bd75ae6fbbadd8b0f (patch) | |
tree | 2e97b42f4bcb11e9680fb7d5113f0f25d40832bc /gcc/cprop.c | |
parent | 8e956c22739b10884d750239938c1e582d0183a3 (diff) | |
download | gcc-ec48209a6c124fea6ff7467bd75ae6fbbadd8b0f.zip gcc-ec48209a6c124fea6ff7467bd75ae6fbbadd8b0f.tar.gz gcc-ec48209a6c124fea6ff7467bd75ae6fbbadd8b0f.tar.bz2 |
re PR rtl-optimization/79386 (ICE: segmentation fault in cprop w/ -O2 on 32-bit BE powerpc)
PR rtl-optimization/79386
* cprop.c (bypass_conditional_jumps): Initialize
bypass_last_basic_block already before splitting bbs after
unconditional traps...
(bypass_conditional_jumps): ... rather than here.
* gcc.c-torture/compile/pr79386.c: New test.
From-SVN: r245251
Diffstat (limited to 'gcc/cprop.c')
-rw-r--r-- | gcc/cprop.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cprop.c b/gcc/cprop.c index f704a0d..e315e53 100644 --- a/gcc/cprop.c +++ b/gcc/cprop.c @@ -1697,7 +1697,6 @@ bypass_conditional_jumps (void) if (ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb == EXIT_BLOCK_PTR_FOR_FN (cfun)) return 0; - bypass_last_basic_block = last_basic_block_for_fn (cfun); mark_dfs_back_edges (); changed = 0; @@ -1863,6 +1862,11 @@ one_cprop_pass (void) } } + /* Make sure bypass_conditional_jumps will ignore not just its new + basic blocks, but also the ones after unconditional traps (those are + unreachable and will be eventually removed as such). */ + bypass_last_basic_block = last_basic_block_for_fn (cfun); + while (!uncond_traps.is_empty ()) { rtx_insn *insn = uncond_traps.pop (); |