This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][mem-ref2] Fix ppc bootstrap
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 19 Jun 2010 13:10:39 +0200 (CEST)
- Subject: [PATCH][mem-ref2] Fix ppc bootstrap
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.
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)