aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@redhat.com>2000-11-29 00:25:08 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2000-11-29 00:25:08 +0000
commitf423a6a7dd5bf70b31f5618c08205975cb36a0f1 (patch)
treeecfd2b30f8e4eb31d32f4b038e1ffe117c8f522b
parenteaf299c6ca247c0fba4007c790f61cb76cb3a083 (diff)
downloadgcc-f423a6a7dd5bf70b31f5618c08205975cb36a0f1.zip
gcc-f423a6a7dd5bf70b31f5618c08205975cb36a0f1.tar.gz
gcc-f423a6a7dd5bf70b31f5618c08205975cb36a0f1.tar.bz2
jump.c (delete_insn): Check that REG_LABEL note actually contains a CODE_LABEL.
* jump.c (delete_insn): Check that REG_LABEL note actually contains a CODE_LABEL. From-SVN: r37835
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/jump.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dfc9b7a..e606be4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/jump.c b/gcc/jump.c
index dcdd4ae..6a916fa 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -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));