The fix is obvious. Tested on hppa64-hp-hpux11.11 and hppa-unknown- linux-gnu with no
observed regressions.  Committed to 4.8 and trunk.

Dave
--
John David Anglin       dave.ang...@bell.net


2013-04-06  John David Anglin  <dave.ang...@nrc-cnrc.gc.ca>

        PR target/55487
        * config/pa/pa.c (legitimize_pic_address): Before incrementing label
        nuses, make sure we have a label.

Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c      (revision 197452)
+++ config/pa/pa.c      (working copy)
@@ -792,7 +792,9 @@
          /* 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;

Reply via email to