From: John David Anglin Date: Mon, 15 Apr 2013 00:36:54 +0000 (+0000) Subject: re PR target/55487 (ICE in mark_jump_label_1, at jump.c:1134 compiling gcc.c-torture... X-Git-Tag: releases/gcc-4.7.4~722 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65e797d6884575c82069602ee14bbb334f921f3f;p=thirdparty%2Fgcc.git 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: r197955 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 13a16d8dbde8..70ec3ebf5f1a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2013-0413 John David Anglin + + Backport from mainline: + 2013-04-06 John David Anglin + + PR target/55487 + * config/pa/pa.c (legitimize_pic_address): Before incrementing label + nuses, make sure we have a label. + 2013-04-11 Richard Biener * BASE-VER: Set to 4.7.4. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index d286a98944bd..1c5fe4d7b2d3 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -790,7 +790,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;