aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-06-16 08:50:31 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2018-06-16 08:50:31 +0200
commit81e994469991a4ddfd7ab91ca6d1a81b01e9f773 (patch)
treeb2ef552ccb8d38578be65f015b2dddf3f9c44d65 /gcc
parent94aedc1c0e27aca2b473c35172b564520a7a63ee (diff)
downloadgcc-81e994469991a4ddfd7ab91ca6d1a81b01e9f773.zip
gcc-81e994469991a4ddfd7ab91ca6d1a81b01e9f773.tar.gz
gcc-81e994469991a4ddfd7ab91ca6d1a81b01e9f773.tar.bz2
re PR rtl-optimization/86108 (crash during unwinding with -O2)
PR rtl-optimization/86108 * bb-reorder.c (create_forwarder_block): Renamed to ... (create_eh_forwarder_block): ... this. Split OLD_BB after labels and jump from new landing pad to the second part. (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad): Adjust callers. From-SVN: r261678
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/bb-reorder.c10
2 files changed, 16 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d3f322d..7fa9a28 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2018-06-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/86108
+ * bb-reorder.c (create_forwarder_block): Renamed to ...
+ (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
+ jump from new landing pad to the second part.
+ (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
+ Adjust callers.
+
2018-06-15 Jakub Jelinek <jakub@redhat.com>
PR middle-end/85878
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index d1019d0..57edde6 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1413,8 +1413,12 @@ get_uncond_jump_length (void)
other partition wrt OLD_BB. */
static basic_block
-create_forwarder_block (rtx_code_label *new_label, basic_block old_bb)
+create_eh_forwarder_block (rtx_code_label *new_label, basic_block old_bb)
{
+ /* Split OLD_BB, so that EH pads have always only incoming EH edges,
+ bb_has_eh_pred bbs are treated specially by DF infrastructure. */
+ old_bb = split_block_after_labels (old_bb)->dest;
+
/* Put the new label and a jump in the new basic block. */
rtx_insn *label = emit_label (new_label);
rtx_code_label *old_label = block_label (old_bb);
@@ -1456,7 +1460,7 @@ sjlj_fix_up_crossing_landing_pad (basic_block old_bb)
LABEL_PRESERVE_P (new_label) = 1;
/* Create the forwarder block. */
- basic_block new_bb = create_forwarder_block (new_label, old_bb);
+ basic_block new_bb = create_eh_forwarder_block (new_label, old_bb);
/* Create the map from old to new lp index and initialize it. */
unsigned *index_map = (unsigned *) alloca (lp_len * sizeof (unsigned));
@@ -1508,7 +1512,7 @@ dw2_fix_up_crossing_landing_pad (eh_landing_pad old_lp, basic_block old_bb)
LABEL_PRESERVE_P (new_lp->landing_pad) = 1;
/* Create the forwarder block. */
- basic_block new_bb = create_forwarder_block (new_lp->landing_pad, old_bb);
+ basic_block new_bb = create_eh_forwarder_block (new_lp->landing_pad, old_bb);
/* Fix up the edges. */
for (ei = ei_start (old_bb->preds); (e = ei_safe_edge (ei)) != NULL; )