From 56b97603ec286907d09f0c38322931c04f4b78e5 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Thu, 21 Jun 2018 17:02:13 +0000 Subject: [PATCH] except.c (finish_eh_generation): Commit edge insertions only after the EH edges have been redirected from... * except.c (finish_eh_generation): Commit edge insertions only after the EH edges have been redirected from post-landing to landing pads. From-SVN: r261855 --- gcc/ChangeLog | 5 +++++ gcc/except.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0550afb59422..d8e1361f8ad7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-06-21 Eric Botcazou + + * except.c (finish_eh_generation): Commit edge insertions only after + the EH edges have been redirected from post-landing to landing pads. + 2018-06-21 Eric Botcazou * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of diff --git a/gcc/except.c b/gcc/except.c index ba42bf68b43e..84666d9041ea 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -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. */ -- 2.43.5