Fix IA-64 libada build failure, abnormal call edges on non-call insns.
authorJames E Wilson <wilson@specifixinc.com>
Tue, 18 Oct 2005 00:22:53 +0000 (17:22 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 18 Oct 2005 00:22:53 +0000 (17:22 -0700)
PR rtl-optimization/17356
* cfgrtl.c (purge_dead_edges): Check for EDGE_ABNORMAL_CALL before
checking for EDGE_EH.

From-SVN: r105533

gcc/ChangeLog
gcc/cfgrtl.c

index c606f83e38356cc712165783326a8598e02f7d67..c7c6e6c1c6feac954b9f3f8b998c66ee658c5a3c 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-17  James E Wilson  <wilson@specifix.com>
+
+       PR rtl-optimization/17356
+       * cfgrtl.c (purge_dead_edges): Check for EDGE_ABNORMAL_CALL before
+       checking for EDGE_EH.
+
 2005-10-17  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * config/sparc/sparc.c (function_arg_slotno): In 64-bit mode, align
index e39b196be07ca520f933ec98177d0cf4f0591b94..00a219d48028008f78f42260b84cbe72b34c0869 100644 (file)
@@ -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;