]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Rewrite fix for PR 17356, fix for enable checking ada build failure.
authorJames E Wilson <wilson@specifixinc.com>
Mon, 31 Oct 2005 23:24:36 +0000 (15:24 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Mon, 31 Oct 2005 23:24:36 +0000 (15:24 -0800)
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

gcc/ChangeLog
gcc/cfgrtl.c

index 17a48a278a5027a685cd1dc4b9dde31d18856316..1fb10c7005115f2a1300456ab0608eacf494f8a1 100644 (file)
@@ -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
index f49eceb1657584f0816927a685344680dd730ec4..d06caba73bd71c53ef111bd016abf873e8243cbb 100644 (file)
@@ -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;