This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2010-07-03  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	PR target/44705
	* config/pa/pa.h (GO_IF_LEGITIMATE_ADDRESS): Reject LABEL_REF.

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					\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]