From patchwork Sat Jul 3 20:53:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [committed] Fix PR target/44705: Invalid MEM with LABEL_REF Date: Sat, 03 Jul 2010 10:53:19 -0000 From: John David Anglin X-Patchwork-Id: 57824 Message-Id: <20100703205320.4DDE84E77@hiauly1.hia.nrc.ca> To: gcc-patches@gcc.gnu.org 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 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 \