aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2cfi.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-09-12 21:29:31 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2011-09-12 21:29:31 +0200
commitb84dad8e0a8051844505c92bb71c0ed323c56a72 (patch)
treeb2ce269ca1366a50948ec3458efcc9c2f65dbe5f /gcc/dwarf2cfi.c
parent3bd0817d1cc191f0d89d2fefa57bf108a53331f2 (diff)
downloadgcc-b84dad8e0a8051844505c92bb71c0ed323c56a72.zip
gcc-b84dad8e0a8051844505c92bb71c0ed323c56a72.tar.gz
gcc-b84dad8e0a8051844505c92bb71c0ed323c56a72.tar.bz2
re PR bootstrap/50010 (bootstrap comparison failure without CFI directives)
PR bootstrap/50010 * dwarf2cfi.c (add_cfis_to_fde): Ignore non-active insns in between NOTE_INSN_CFI notes, with the exception of NOTE_INSN_SWITCH_TEXT_SECTIONS. From-SVN: r178795
Diffstat (limited to 'gcc/dwarf2cfi.c')
-rw-r--r--gcc/dwarf2cfi.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c
index 30e9501..4f44c77 100644
--- a/gcc/dwarf2cfi.c
+++ b/gcc/dwarf2cfi.c
@@ -2153,11 +2153,18 @@ add_cfis_to_fde (void)
if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_CFI)
{
bool required = cfi_label_required_p (NOTE_CFI (insn));
- while (next && NOTE_P (next) && NOTE_KIND (next) == NOTE_INSN_CFI)
- {
- required |= cfi_label_required_p (NOTE_CFI (next));
+ while (next)
+ if (NOTE_P (next) && NOTE_KIND (next) == NOTE_INSN_CFI)
+ {
+ required |= cfi_label_required_p (NOTE_CFI (next));
+ next = NEXT_INSN (next);
+ }
+ else if (active_insn_p (next)
+ || (NOTE_P (next) && (NOTE_KIND (next)
+ == NOTE_INSN_SWITCH_TEXT_SECTIONS)))
+ break;
+ else
next = NEXT_INSN (next);
- }
if (required)
{
int num = dwarf2out_cfi_label_num;
@@ -2178,7 +2185,9 @@ add_cfis_to_fde (void)
do
{
- VEC_safe_push (dw_cfi_ref, gc, fde->dw_fde_cfi, NOTE_CFI (insn));
+ if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_CFI)
+ VEC_safe_push (dw_cfi_ref, gc, fde->dw_fde_cfi,
+ NOTE_CFI (insn));
insn = NEXT_INSN (insn);
}
while (insn != next);