aboutsummaryrefslogtreecommitdiff
path: root/gcc/reorg.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-03-31 18:45:21 +0000
committerJakub Jelinek <jakub@redhat.com>2002-03-31 18:45:21 +0000
commitd88a0ce252cbc1cd11a4d10b427eb321bf085277 (patch)
treec2809676f9bd4ac3a167984c72a6de47dc1e7a97 /gcc/reorg.c
parenta4bb4b94d7f61596f2998edfc2a7760532de1a4a (diff)
PR middle-end/6096, middle-end/6098, middle-end/6099
* reorg.c (emit_delay_sequence): Only increment LABEL_NUSES for CODE_LABELs. (fill_slots_from_thread): Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@51668 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reorg.c')
-rw-r--r--gcc/reorg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/reorg.c b/gcc/reorg.c
index b1c33f5bf0d..6fc73f1413b 100644
--- a/gcc/reorg.c
+++ b/gcc/reorg.c
@@ -511,7 +511,8 @@ emit_delay_sequence (insn, list, length)
case REG_LABEL:
/* Keep the label reference count up to date. */
- LABEL_NUSES (XEXP (note, 0)) ++;
+ if (GET_CODE (XEXP (note, 0)) == CODE_LABEL)
+ LABEL_NUSES (XEXP (note, 0)) ++;
break;
default:
@@ -2732,12 +2733,13 @@ fill_slots_from_thread (insn, condition, thread, opposite_thread, likely,
temporarily increment the use count on any referenced
label lest it be deleted by delete_related_insns. */
note = find_reg_note (trial, REG_LABEL, 0);
- if (note)
+ /* REG_LABEL could be NOTE_INSN_DELETED_LABEL too. */
+ if (note && GET_CODE (XEXP (note, 0)) == CODE_LABEL)
LABEL_NUSES (XEXP (note, 0))++;
delete_related_insns (trial);
- if (note)
+ if (note && GET_CODE (XEXP (note, 0)) == CODE_LABEL)
LABEL_NUSES (XEXP (note, 0))--;
}
else