diff mbox

[mem-ref2] Fix ppc bootstrap

Message ID alpine.LNX.2.00.1006191308540.1429@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener June 19, 2010, 11:10 a.m. UTC
This fixes ppc bootstrap by simply handling all MEM_REFs with
possibly-register object that has a non-MEM RTL via the bitfield
path.

Bootstrapped and tested on x86_64-unknown-linux-gnu and ppc64-linux-gnu,
committed.  ppc64 results differ the same from trunk as the x86_64
results do, so appearanlty no surprises on big-endian targets.

Richard.

2010-06-19  Richard Guenther  <rguenther@suse.de>

	* expr.c (expand_expr_real_1): Expand all non-MEM MEM_REFs
	via the bitfield path.
diff mbox

Patch

Index: gcc/expr.c
===================================================================
--- gcc/expr.c	(revision 160990)
+++ gcc/expr.c	(working copy)
@@ -8817,7 +8817,9 @@  expand_expr_real_1 (tree exp, rtx target
 	       decl we must use bitfield operations.  */
 	    if (DECL_P (base)
 		&& !TREE_ADDRESSABLE (base)
-		&& DECL_MODE (base) != BLKmode)
+		&& DECL_MODE (base) != BLKmode
+		&& DECL_RTL_SET_P (base)
+		&& !MEM_P (DECL_RTL (base)))
 	      {
 		tree bftype;
 		if (offset == 0
@@ -8827,9 +8829,6 @@  expand_expr_real_1 (tree exp, rtx target
 		  return expand_expr (build1 (VIEW_CONVERT_EXPR,
 					      TREE_TYPE (exp), base),
 				      target, tmode, modifier);
-		gcc_assert (!DECL_RTL_SET_P (base)
-			    || REG_P (DECL_RTL (base))
-			    || GET_CODE (DECL_RTL (base)) == CONCAT);
 		bit_offset = bitsize_int (offset * BITS_PER_UNIT);
 		bftype = TREE_TYPE (base);
 		if (TYPE_MODE (TREE_TYPE (exp)) != BLKmode)