(legitimate_address_p): Reject address whose index is itself the sum of two
authorNick Clifton <nickc@redhat.com>
Fri, 10 Dec 2004 14:03:45 +0000 (14:03 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Fri, 10 Dec 2004 14:03:45 +0000 (14:03 +0000)
other parts.

From-SVN: r91991

gcc/ChangeLog
gcc/config/mn10300/mn10300.c

index 9503cf96f368b3b00ffc8a71828fdcd0ae4d04e3..667977e4962ca63fcdb0308d626ba0270fb669b7 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-10  Nick Clifton  <nickc@redhat.com>
+
+       * config/mn10300/mn10300.c (legitimate_address_p): Reject address
+       whose index is itself the sum of two other parts.
+
 2004-12-10  Alan Modra  <amodra@bigpond.net.au>
 
        * config/t-slibgcc-sld (SHLIB_LINK): Correct symlink.
index b0af9d91d27e60477646947be7ca76f8dd704d40..6a260502cf5088f9f7ecde4d943b5f9ec4c33940 100644 (file)
@@ -1887,6 +1887,7 @@ legitimate_address_p (enum machine_mode mode, rtx x, int strict)
          if (GET_CODE (index) == CONST_INT)
            return TRUE;
          if (GET_CODE (index) == CONST
+             && GET_CODE (XEXP (index, 0)) != PLUS
              && (! flag_pic
                  || legitimate_pic_operand_p (index)))
            return TRUE;