diff options
author | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-06 17:42:27 +0000 |
---|---|---|
committer | danglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-04-06 17:42:27 +0000 |
commit | 4aa618ec97ff9c04bbc173a3a34e0b7b036b4336 (patch) | |
tree | 4b376d09f47fb96c49f1636b4a732cd58dbe1612 /gcc/config/pa | |
parent | 3ba222c140e5fbdd82a24047025a87e014196119 (diff) | |
download | gcc-4aa618ec97ff9c04bbc173a3a34e0b7b036b4336.tar.gz |
PR target/55487
* config/pa/pa.c (legitimize_pic_address): Before incrementing label
nuses, make sure we have a label.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197541 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/pa')
-rw-r--r-- | gcc/config/pa/pa.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index c06513c567d..878883d6b38 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -792,7 +792,9 @@ legitimize_pic_address (rtx orig, enum machine_mode mode, rtx reg) /* Extract CODE_LABEL. */ orig = XEXP (orig, 0); add_reg_note (insn, REG_LABEL_OPERAND, orig); - LABEL_NUSES (orig)++; + /* Make sure we have label and not a note. */ + if (LABEL_P (orig)) + LABEL_NUSES (orig)++; } crtl->uses_pic_offset_table = 1; return reg; |