diff mbox

[committed] Fix PR target/55487: Don't increment label nuses on NOTE_INSN_DELETED_LABEL notes

Message ID BLU0-SMTP121C5A1FDC80409B6A4E5D97DB0@phx.gbl
State New
Headers show

Commit Message

John David Anglin April 6, 2013, 5:53 p.m. UTC
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.anglin@bell.net
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.
diff mbox

Patch

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;