Message ID | 20180615190616.GE7166@tucnak |
---|---|
State | New |
Headers | show |
Series | Fix -freorder-blocks-and-partition unwinding wrong-code (PR rtl-optimization/86108) | expand |
--- gcc/bb-reorder.c.jj 2018-05-31 21:51:18.508292965 +0200 +++ gcc/bb-reorder.c 2018-06-15 12:57:34.501095317 +0200 @@ -1507,8 +1507,11 @@ dw2_fix_up_crossing_landing_pad (eh_land new_lp->landing_pad = gen_label_rtx (); LABEL_PRESERVE_P (new_lp->landing_pad) = 1; + e = split_block_after_labels (old_bb); + old_bb = e->src; + /* Create the forwarder block. */ - basic_block new_bb = create_forwarder_block (new_lp->landing_pad, old_bb); + basic_block new_bb = create_forwarder_block (new_lp->landing_pad, e->dest); /* Fix up the edges. */ for (ei = ei_start (old_bb->preds); (e = ei_safe_edge (ei)) != NULL; )