> OK, thanks.  I'll give it a try on x86/Windows once this is in.

The build of the Ada runtime miserably fails because finish_eh_generation 
calls commit_edge_insertions before redirecting the EH edges from the post-
landing pads to the landing pads...

Fixed thusly, applied on the mainline as obvious. I think that's good enough 
because the only edge onto which instructions can be inserted in the entry 
edge (including  by the Alpha kludge).


        * except.c (finish_eh_generation): Commit edge insertions only after the
        EH edges have been redirected from post-landing to landing pads.

-- 
Eric Botcazou
Index: except.c
===================================================================
--- except.c	(revision 261832)
+++ except.c	(working copy)
@@ -1510,12 +1510,8 @@ finish_eh_generation (void)
     sjlj_build_landing_pads ();
   else
     dw2_build_landing_pads ();
-  break_superblocks ();
 
-  if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ
-      /* Kludge for Alpha (see alpha_gp_save_rtx).  */
-      || single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun))->insns.r)
-    commit_edge_insertions ();
+  break_superblocks ();
 
   /* Redirect all EH edges from the post_landing_pad to the landing pad.  */
   FOR_EACH_BB_FN (bb, cfun)
@@ -1546,6 +1542,11 @@ finish_eh_generation (void)
 		       : EDGE_ABNORMAL);
 	}
     }
+
+  if (targetm_common.except_unwind_info (&global_options) == UI_SJLJ
+      /* Kludge for Alpha (see alpha_gp_save_rtx).  */
+      || single_succ_edge (ENTRY_BLOCK_PTR_FOR_FN (cfun))->insns.r)
+    commit_edge_insertions ();
 }
 
 /* This section handles removing dead code for flow.  */

Reply via email to