jump.c (delete_insn): Check that REG_LABEL note actually contains a CODE_LABEL.
authorJ"orn Rennecke <amylaar@redhat.com>
Wed, 29 Nov 2000 00:25:08 +0000 (00:25 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 29 Nov 2000 00:25:08 +0000 (00:25 +0000)
* jump.c (delete_insn): Check that REG_LABEL note actually contains
a CODE_LABEL.

From-SVN: r37835

gcc/ChangeLog
gcc/jump.c

index dfc9b7af196c7c1557cd6807a41e759818ef9d5e..e606be48007cbb874e134b8c648817095f0d5318 100644 (file)
@@ -1,3 +1,8 @@
+Wed Nov 29 00:08:23 2000  J"orn Rennecke <amylaar@redhat.com>
+
+       * jump.c (delete_insn): Check that REG_LABEL note actually contains
+       a CODE_LABEL.
+
 2000-11-28  Neil Booth  <neilb@earthling.net>
 
         * c-common.h: Remove flag_digraphs.
index dcdd4aec693a55208dd9c66a16647a518eb10d68..6a916fa8cd9751367400781caf394eddaa77955e 100644 (file)
@@ -2857,7 +2857,9 @@ delete_insn (insn)
   /* Likewise for an ordinary INSN / CALL_INSN with a REG_LABEL note.  */
   if (GET_CODE (insn) == INSN || GET_CODE (insn) == CALL_INSN)
     for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
-      if (REG_NOTE_KIND (note) == REG_LABEL)
+      if (REG_NOTE_KIND (note) == REG_LABEL
+         /* This could also be a NOTE_INSN_DELETED_LABEL note.  */
+         && GET_CODE (XEXP (note, 0)) == CODE_LABEL)
        if (--LABEL_NUSES (XEXP (note, 0)) == 0)
          delete_insn (XEXP (note, 0));