diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-28 14:40:59 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-28 14:40:59 +0000 |
commit | 11d28f28f4edf0fdb8e953bfc3ac6c67b92c0a52 (patch) | |
tree | d1451ac1af960f4369787457d8e40b7d11076fb2 /gcc/tree-cfgcleanup.c | |
parent | fbbe5b510bd02be85369bc1f943c900c30051221 (diff) | |
download | gcc-11d28f28f4edf0fdb8e953bfc3ac6c67b92c0a52.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156322 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r-- | gcc/tree-cfgcleanup.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c index 201298dc535..6810f4b0894 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 |