aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
authorRichard Biener <rguenth@gcc.gnu.org>2010-01-28 14:40:59 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-01-28 14:40:59 +0000
commit28e5ca15b76773b91191541d79d67ef15510fdb1 (patch)
treed1451ac1af960f4369787457d8e40b7d11076fb2 /gcc/tree-cfgcleanup.c
parent8adfe01d22b81637ff7fe786212993db8b236e30 (diff)
downloadgcc-28e5ca15b76773b91191541d79d67ef15510fdb1.zip
gcc-28e5ca15b76773b91191541d79d67ef15510fdb1.tar.gz
gcc-28e5ca15b76773b91191541d79d67ef15510fdb1.tar.bz2
re PR middle-end/42883 (internal compiler error: in redirect_eh_edge_1, at tree-eh.c:2112)
2010-01-28 Richard Guenther <rguenther@suse.de> PR middle-end/42883 * tree-cfgcleanup.c (remove_forwarder_block): Do not remove the forwarder if the destination is an EH landing pad. * g++.dg/torture/pr42883.C: New testcase. From-SVN: r156322
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r--gcc/tree-cfgcleanup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 201298d..6810f4b 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -345,12 +345,13 @@ remove_forwarder_block (basic_block bb)
if (dest == bb)
return false;
- /* If the destination block consists of a nonlocal label, do not merge
- it. */
+ /* If the destination block consists of a nonlocal label or is a
+ EH landing pad, do not merge it. */
label = first_stmt (dest);
if (label
&& gimple_code (label) == GIMPLE_LABEL
- && DECL_NONLOCAL (gimple_label_label (label)))
+ && (DECL_NONLOCAL (gimple_label_label (label))
+ || EH_LANDING_PAD_NR (gimple_label_label (label)) != 0))
return false;
/* If there is an abnormal edge to basic block BB, but not into