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
This commit is contained in:
J"orn Rennecke 2000-11-29 00:25:08 +00:00 committed by Joern Rennecke
parent eaf299c6ca
commit f423a6a7dd
2 changed files with 8 additions and 1 deletions

View 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.

View 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));