summaryrefslogtreecommitdiff
path: root/gcc/cfgrtl.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-18 00:22:53 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-18 00:22:53 +0000
commit0990886a088a86efe0c7555396a0c1024de8f059 (patch)
treeed724d81437e2a094d7d1b08694e9eb665cee483 /gcc/cfgrtl.c
parent4c466493fe1b761304170e8637bf8583e2d2f1b5 (diff)
downloadgcc-0990886a088a86efe0c7555396a0c1024de8f059.tar.gz
Fix IA-64 libada build failure, abnormal call edges on non-call insns.
PR rtl-optimization/17356 * cfgrtl.c (purge_dead_edges): Check for EDGE_ABNORMAL_CALL before checking for EDGE_EH. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105533 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r--gcc/cfgrtl.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index e39b196be07..00a219d4802 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -2300,19 +2300,23 @@ purge_dead_edges (basic_block bb)
/* Cleanup abnormal edges caused by exceptions or non-local gotos. */
for (ei = ei_start (bb->succs); (e = ei_safe_edge (ei)); )
{
- if (e->flags & EDGE_EH)
+ /* We must check for the most restrictive condition first. Since
+ an abnormal call edge is always an EH edge, but an EH edge is not
+ always an abnormal call edge, we must check for an abnormal call
+ edge first. */
+ if (e->flags & EDGE_ABNORMAL_CALL)
{
- if (can_throw_internal (BB_END (bb)))
+ if (CALL_P (BB_END (bb))
+ && (! (note = find_reg_note (insn, REG_EH_REGION, NULL))
+ || INTVAL (XEXP (note, 0)) >= 0))
{
ei_next (&ei);
continue;
}
}
- else if (e->flags & EDGE_ABNORMAL_CALL)
+ else if (e->flags & EDGE_EH)
{
- if (CALL_P (BB_END (bb))
- && (! (note = find_reg_note (insn, REG_EH_REGION, NULL))
- || INTVAL (XEXP (note, 0)) >= 0))
+ if (can_throw_internal (BB_END (bb)))
{
ei_next (&ei);
continue;