]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/55487 (ICE in mark_jump_label_1, at jump.c:1134 compiling gcc.c-torture...
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Mon, 15 Apr 2013 00:36:54 +0000 (00:36 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Mon, 15 Apr 2013 00:36:54 +0000 (00:36 +0000)
PR target/55487
* config/pa/pa.c (legitimize_pic_address): Before incrementing label
nuses, make sure we have a label.

From-SVN: r197955

gcc/ChangeLog
gcc/config/pa/pa.c

index 13a16d8dbde8740712342e82a4448c8a9bbb5d59..70ec3ebf5f1a2fefc665a6b121aab3953d9d78a6 100644 (file)
@@ -1,3 +1,12 @@
+2013-0413  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       Backport from mainline:
+       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-11  Richard Biener  <rguenther@suse.de>
 
        * BASE-VER: Set to 4.7.4.
index d286a98944bd2d6abe41d28117b83e00c12231f3..1c5fe4d7b2d3cd979573c28e96c62313f77a4106 100644 (file)
@@ -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;