diff options
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 7354c73c7fb..5769ef366b5 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -156,9 +156,15 @@ delete_insn (rtx insn) LABEL_NUSES (JUMP_LABEL (insn))--; /* Also if deleting an insn that references a label. */ - else if ((note = find_reg_note (insn, REG_LABEL, NULL_RTX)) != NULL_RTX - && GET_CODE (XEXP (note, 0)) == CODE_LABEL) - LABEL_NUSES (XEXP (note, 0))--; + else + { + while ((note = find_reg_note (insn, REG_LABEL, NULL_RTX)) != NULL_RTX + && GET_CODE (XEXP (note, 0)) == CODE_LABEL) + { + LABEL_NUSES (XEXP (note, 0))--; + remove_note (insn, note); + } + } if (GET_CODE (insn) == JUMP_INSN && (GET_CODE (PATTERN (insn)) == ADDR_VEC |