Patchwork [committed] Fix PR target/44705: Invalid MEM with LABEL_REF

login
register
mail settings
Submitter John David Anglin
Date July 3, 2010, 8:53 p.m.
Message ID <20100703205320.4DDE84E77@hiauly1.hia.nrc.ca>
Download mbox | patch
Permalink /patch/57824/
State New
Headers show

Comments

John David Anglin - July 3, 2010, 8:53 p.m.
The enclosed change fixes PR target/44705.  This regression was exposed
by the new testcase gcc.dg/pr44674.c.  It's a bit surprising that this
was never reported before since the mistake in GO_IF_LEGITIMATE_ADDRESS
has been around for some time.

Tested on hppa2.0w-hp-hpux11.11, hppa64-hp-hpux11.11, hppa-unknown-linux-gnu.
The hpux tests were done on trunk, 4.5 and 4.3.  Committed to trunk, 4.5,
4.4 and 4.3.

Dave

Patch

Index: config/pa/pa.h
===================================================================
--- config/pa/pa.h	(revision 161574)
+++ config/pa/pa.h	(working copy)
@@ -1142,9 +1142,7 @@ 
 	       || ((MODE) != SFmode					\
 		   && (MODE) != DFmode)))				\
     goto ADDR;								\
-  else if (GET_CODE (X) == LABEL_REF					\
-	   || (GET_CODE (X) == CONST_INT				\
-	       && INT_5_BITS (X)))					\
+  else if (GET_CODE (X) == CONST_INT && INT_5_BITS (X))			\
     goto ADDR;								\
   /* Needed for -fPIC */						\
   else if (GET_CODE (X) == LO_SUM					\