diff options
author | Marek Polacek <polacek@redhat.com> | 2015-08-27 17:07:35 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-08-27 17:07:35 +0000 |
commit | b7e36a33eb4b756440b9a93f812414a42800f38b (patch) | |
tree | cae0692e9b91e7fb38962e506c13e43fc46937bd /gcc/tree-ssa-dce.c | |
parent | 078c4a8c534aa3a22735cd0af4b168ed844b671a (diff) | |
download | gcc-b7e36a33eb4b756440b9a93f812414a42800f38b.zip gcc-b7e36a33eb4b756440b9a93f812414a42800f38b.tar.gz gcc-b7e36a33eb4b756440b9a93f812414a42800f38b.tar.bz2 |
re PR middle-end/67005 (ICE: in verify_loop_structure, at cfgloop.c:1647 (loop with header n not in loop tree))
PR middle-end/67005
* tree-ssa-dce.c (remove_dead_stmt): Also schedule fixup if removing
an entry into an irreducible region.
* gcc.dg/torture/pr67005.c: New test.
From-SVN: r227268
Diffstat (limited to 'gcc/tree-ssa-dce.c')
-rw-r--r-- | gcc/tree-ssa-dce.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 2d2edc8..50dfded 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -1125,10 +1125,11 @@ remove_dead_stmt (gimple_stmt_iterator *i, basic_block bb) if (e != e2) { cfg_altered = true; - /* If we made a BB unconditionally exit a loop then this - transform alters the set of BBs in the loop. Schedule - a fixup. */ - if (loop_exit_edge_p (bb->loop_father, e)) + /* If we made a BB unconditionally exit a loop or removed + an entry into an irreducible region, then this transform + alters the set of BBs in the loop. Schedule a fixup. */ + if (loop_exit_edge_p (bb->loop_father, e) + || (e2->dest->flags & BB_IRREDUCIBLE_LOOP)) loops_state_set (LOOPS_NEED_FIXUP); remove_edge (e2); } |