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]

fix target/21632


I missed a spot when rearranging the symbolic_operand predicates.


r~


        * config/ia64/ia64.c (ia64_extra_constraint) <'T'>: Use
        small_addr_symbolic_operand.

Index: config/ia64/ia64.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.c,v
retrieving revision 1.347.2.6
diff -u -p -d -r1.347.2.6 ia64.c
--- config/ia64/ia64.c	16 May 2005 02:14:07 -0000	1.347.2.6
+++ config/ia64/ia64.c	18 May 2005 16:49:53 -0000
@@ -627,8 +627,7 @@ ia64_extra_constraint (rtx value, char c
 
     case 'T':
       /* Symbol ref to small-address-area.  */
-      return (GET_CODE (value) == SYMBOL_REF
-	      && SYMBOL_REF_SMALL_ADDR_P (value));
+      return small_addr_symbolic_operand (value, VOIDmode);
 
     case 'U':
       /* Vector zero.  */
Index: testsuite/gcc.target/ia64/small-addr-1.c
===================================================================
RCS file: testsuite/gcc.target/ia64/small-addr-1.c
diff -N testsuite/gcc.target/ia64/small-addr-1.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ testsuite/gcc.target/ia64/small-addr-1.c	18 May 2005 16:49:53 -0000
@@ -0,0 +1,23 @@
+/* PR target/21632 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct S
+{
+  void *s[256];
+};
+
+struct T
+{
+  long t[23];
+  struct S *u;
+};
+
+extern struct T __attribute__((model (small))) v;
+
+void *
+foo (void)
+{
+  return v.u->s[0];
+}
+


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