Commit 0eeb9f3d by Eric Botcazou Committed by Eric Botcazou

re PR target/81361 (broken exception handling at -O2)

	PR target/81361
	* dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
	switching to a new text section.

From-SVN: r252914
parent 845af9e6
2017-09-18 Eric Botcazou <ebotcazou@adacore.com>
PR target/81361
* dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
switching to a new text section.
2017-09-18 Richard Biener <rguenther@suse.de>
* graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
......
......@@ -2209,20 +2209,13 @@ add_cfis_to_fde (void)
{
dw_fde_ref fde = cfun->fde;
rtx_insn *insn, *next;
/* We always start with a function_begin label. */
bool first = false;
for (insn = get_insns (); insn; insn = next)
{
next = NEXT_INSN (insn);
if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_SWITCH_TEXT_SECTIONS)
{
fde->dw_fde_switch_cfi_index = vec_safe_length (fde->dw_fde_cfi);
/* Don't attempt to advance_loc4 between labels
in different sections. */
first = true;
}
fde->dw_fde_switch_cfi_index = vec_safe_length (fde->dw_fde_cfi);
if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_CFI)
{
......@@ -2247,8 +2240,7 @@ add_cfis_to_fde (void)
/* Set the location counter to the new label. */
xcfi = new_cfi ();
xcfi->dw_cfi_opc = (first ? DW_CFA_set_loc
: DW_CFA_advance_loc4);
xcfi->dw_cfi_opc = DW_CFA_advance_loc4;
xcfi->dw_cfi_oprnd1.dw_cfi_addr = label;
vec_safe_push (fde->dw_fde_cfi, xcfi);
......@@ -2263,7 +2255,6 @@ add_cfis_to_fde (void)
insn = NEXT_INSN (insn);
}
while (insn != next);
first = false;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment