diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-01 23:15:55 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-01 23:15:55 +0000 |
commit | 79f00c5309728359601b132f09858941123755e7 (patch) | |
tree | 9670c06dfea2617837cb65f1ad57954f4d2e1ff7 /gcc/cfgcleanup.c | |
parent | a95bcb36a2995d93d045f3d980386f7d4c5c2516 (diff) | |
download | gcc-79f00c5309728359601b132f09858941123755e7.tar.gz |
* cfgcleanup.c (outgoing_edges_match): Check REG_EH_REGION notes
even if nehedges1 is 0.
* g++.dg/eh/crossjump1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70080 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgcleanup.c')
-rw-r--r-- | gcc/cfgcleanup.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index d03a16d88f9..1937ad03dd2 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. */ |