aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgcleanup.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2003-08-02 01:15:55 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2003-08-02 01:15:55 +0200
commit5f77fbd46877af98e624b3b799c9ab4d49cc6891 (patch)
tree9670c06dfea2617837cb65f1ad57954f4d2e1ff7 /gcc/cfgcleanup.c
parentf4dbf936c77b638c3e61a22cbc4f45f8ae0c0d87 (diff)
downloadgcc-5f77fbd46877af98e624b3b799c9ab4d49cc6891.zip
gcc-5f77fbd46877af98e624b3b799c9ab4d49cc6891.tar.gz
gcc-5f77fbd46877af98e624b3b799c9ab4d49cc6891.tar.bz2
cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION notes even if nehedges1 is 0.
* cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION notes even if nehedges1 is 0. * g++.dg/eh/crossjump1.C: New test. From-SVN: r70080
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r--gcc/cfgcleanup.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index d03a16d..1937ad0 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -1337,15 +1337,17 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2)
return false;
}
- /* In case we do have EH edges, ensure we are in the same region. */
- if (nehedges1)
- {
- rtx n1 = find_reg_note (bb1->end, REG_EH_REGION, 0);
- rtx n2 = find_reg_note (bb2->end, REG_EH_REGION, 0);
+ /* Ensure the same EH region. */
+ {
+ rtx n1 = find_reg_note (bb1->end, REG_EH_REGION, 0);
+ rtx n2 = find_reg_note (bb2->end, REG_EH_REGION, 0);
- if (XEXP (n1, 0) != XEXP (n2, 0))
- return false;
- }
+ if (!n1 && n2)
+ return false;
+
+ if (n1 && (!n2 || XEXP (n1, 0) != XEXP (n2, 0)))
+ return false;
+ }
/* We don't need to match the rest of edges as above checks should be enough
to ensure that they are equivalent. */