diff options
author | James E Wilson <wilson@specifixinc.com> | 2005-10-31 15:24:36 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2005-10-31 15:24:36 -0800 |
commit | e5f9a909f1b40be029ac2285fac82d8ab13e3c20 (patch) | |
tree | 3e1f58b0184d865dc21af1f539e7f543cfdd8b34 /gcc | |
parent | d63f0fe58ad1702b1efbf8bafa83266755c889aa (diff) | |
download | gcc-e5f9a909f1b40be029ac2285fac82d8ab13e3c20.zip gcc-e5f9a909f1b40be029ac2285fac82d8ab13e3c20.tar.gz gcc-e5f9a909f1b40be029ac2285fac82d8ab13e3c20.tar.bz2 |
Rewrite fix for PR 17356, fix for enable checking ada build failure.
cfgrtl.c (purge_dead_edges): Undo last change. In EDGE_EH code,
add check for CALL_INSN if EDGE_ABRNOMAL_CALL true.
From-SVN: r106297
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cfgrtl.c | 22 |
2 files changed, 18 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 17a48a2..1fb10c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-10-25 James E. Wilson <wilson@specifix.com> + + PR rtl-optimization/17356 + * cfgrtl.c (purge_dead_edges): Undo last change. In EDGE_EH code, + add check for CALL_INSN if EDGE_ABRNOMAL_CALL true. + 2005-10-31 Jan Hubicka <jh@suse.cz> PR middle-end/24093 diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index f49eceb..d06caba 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2294,23 +2294,25 @@ 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)); ) { - /* 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) + /* There are three types of edges we need to handle correctly here: EH + edges, abnormal call EH edges, and abnormal call non-EH edges. The + latter can appear when nonlocal gotos are used. */ + 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)) + /* If this is a call edge, verify that this is a call insn. */ + && (! (e->flags & EDGE_ABNORMAL_CALL) + || CALL_P (BB_END (bb)))) { ei_next (&ei); continue; } } - else if (e->flags & EDGE_EH) + else 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; |