diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2017-09-18 09:15:32 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-09-18 09:15:32 +0000 |
commit | 0eeb9f3d7cb92d0e32fb7e206ba61ec74268c386 (patch) | |
tree | 1d23d9725179797fa2dfe0145137e045f48ccbcd /gcc | |
parent | 845af9e6dd60d34cbcda3c95d36adc57985a13a9 (diff) | |
download | gcc-0eeb9f3d7cb92d0e32fb7e206ba61ec74268c386.zip gcc-0eeb9f3d7cb92d0e32fb7e206ba61ec74268c386.tar.gz gcc-0eeb9f3d7cb92d0e32fb7e206ba61ec74268c386.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2cfi.c | 13 |
2 files changed, 8 insertions, 11 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fe4fcfa..17b0d7c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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): diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index b2ee8d6..45b5e30 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -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; } } } |