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]

[PATCH] Fix two RTL checking bugs


Hi,

while trying to bootstrap with RTL checking enabled, I stumbled over these 
bugs.

Bootstrapped on powerpc-linux-gnu.

OK to commit?

Franz.

	* expr.c (store_constructor): Apply MEM_ALIAS_SET to MEMs only.
	* rs6000/rs6000.c (rs6000_hash_constant): use X0INT to access a LABEL_REF.
Index: gcc/expr.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/expr.c,v
retrieving revision 1.266
diff -u -p -r1.266 expr.c
--- gcc/expr.c	2000/10/06 14:59:56	1.266
+++ gcc/expr.c	2000/10/12 20:56:13
@@ -4219,7 +4219,8 @@ store_constructor_field (target, bitsize
 			    plus_constant (XEXP (target, 0),
 					   bitpos / BITS_PER_UNIT));
 
-      MEM_ALIAS_SET (target) = alias_set;
+      if (GET_CODE (target) == MEM)
+	MEM_ALIAS_SET (target) = alias_set;
       store_constructor (exp, target, align, cleared, bitsize / BITS_PER_UNIT);
     }
   else
Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.150
diff -u -p -r1.150 rs6000.c
--- gcc/config/rs6000/rs6000.c	2000/10/01 05:29:14	1.150
+++ gcc/config/rs6000/rs6000.c	2000/10/12 20:56:21
@@ -6556,7 +6556,7 @@ rs6000_hash_constant (k)
   int fidx;
   
   if (GET_CODE (k) == LABEL_REF)
-    return result * 1231 + XINT (XEXP (k, 0), 3);
+    return result * 1231 + X0INT (XEXP (k, 0), 3);
 
   if (GET_CODE (k) == CONST_DOUBLE)
     fidx = 2;

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