re PR bootstrap/50010 (bootstrap comparison failure without CFI directives)
authorJakub Jelinek <jakub@redhat.com>
Mon, 12 Sep 2011 19:29:31 +0000 (21:29 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 12 Sep 2011 19:29:31 +0000 (21:29 +0200)
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

gcc/ChangeLog
gcc/dwarf2cfi.c

index 48b4af76907243455d892e834f4034632ed73bff..8253d64486c7cab3dbe0383c5665de9222d07e1e 100644 (file)
@@ -1,3 +1,10 @@
+2011-09-12  Jakub Jelinek  <jakub@redhat.com>
+
+       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.
+
 2011-09-12  Bernd Schmidt  <bernds@codesourcery.com>
            Richard Sandiford  <rdsandiford@googlemail.com>
 
index 30e95017014c455ee3f82a992b217f245068d230..4f44c7744b331734819c50c8a8d0872f855690f1 100644 (file)
@@ -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);