aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2013-04-06 17:42:27 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2013-04-06 17:42:27 +0000
commit27e430a2b2f942c437cb5bebcad92a60ce841809 (patch)
tree4b376d09f47fb96c49f1636b4a732cd58dbe1612
parenta2cc7735795cbf1819d01e28f3a2177e520fa22c (diff)
downloadgcc-27e430a2b2f942c437cb5bebcad92a60ce841809.zip
gcc-27e430a2b2f942c437cb5bebcad92a60ce841809.tar.gz
gcc-27e430a2b2f942c437cb5bebcad92a60ce841809.tar.bz2
re PR target/55487 (ICE in mark_jump_label_1, at jump.c:1134 compiling gcc.c-torture/execute/pr51447.c at -O2 and above)
PR target/55487 * config/pa/pa.c (legitimize_pic_address): Before incrementing label nuses, make sure we have a label. From-SVN: r197541
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/pa/pa.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a753113..966b222 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-04-06 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR target/55487
+ * config/pa/pa.c (legitimize_pic_address): Before incrementing label
+ nuses, make sure we have a label.
+
2013-04-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/56843
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index c06513c..878883d 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;