This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix PR target/44705: Invalid MEM with LABEL_REF
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 3 Jul 2010 16:53:19 -0400 (EDT)
- Subject: [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 \