aboutsummaryrefslogtreecommitdiff
path: root/gcc/postreload.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2012-11-11 20:29:11 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2012-11-11 20:29:11 +0000
commit159520acf76cf7159e171370e06c7a6dd51d594d (patch)
tree543961f5fa17d2845bed07701ce91e092266962c /gcc/postreload.c
parent18abab9fee744f3e47654b4e7efbaeb6bfbf9574 (diff)
downloadgcc-159520acf76cf7159e171370e06c7a6dd51d594d.zip
gcc-159520acf76cf7159e171370e06c7a6dd51d594d.tar.gz
gcc-159520acf76cf7159e171370e06c7a6dd51d594d.tar.bz2
re PR middle-end/55263 (ICE: pre_and_rev_post_order_compute, at cfganal.c:875 with -O -fgcse-after-reload -fnon-call-exceptions)
gcc/ PR middle-end/55263 * postreload.c (rest_of_handle_postreload): With non-call exceptions, if edges are purged call cleanup_cfg to remove unreachable blocks. testsuite/ PR middle-end/55263 * g++.dg/pr55263.C: New test. From-SVN: r193412
Diffstat (limited to 'gcc/postreload.c')
-rw-r--r--gcc/postreload.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/postreload.c b/gcc/postreload.c
index cafcf0f..32c5b5f 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -2289,8 +2289,9 @@ rest_of_handle_postreload (void)
reload_cse_regs (get_insns ());
/* Reload_cse_regs can eliminate potentially-trapping MEMs.
Remove any EH edges associated with them. */
- if (cfun->can_throw_non_call_exceptions)
- purge_all_dead_edges ();
+ if (cfun->can_throw_non_call_exceptions
+ && purge_all_dead_edges ())
+ cleanup_cfg (0);
return 0;
}