aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-04-09 01:35:36 +0000
committerJeff Law <law@gcc.gnu.org>1999-04-08 19:35:36 -0600
commitefd07ca794e44bc05035e4320ce23f772639990e (patch)
tree97871af969e7493ca12efe82a3b59327cf740b4d /gcc/expr.c
parentabb3f0a989ba263258704a50ca8bc5be8a35c40d (diff)
downloadgcc-efd07ca794e44bc05035e4320ce23f772639990e.zip
gcc-efd07ca794e44bc05035e4320ce23f772639990e.tar.gz
gcc-efd07ca794e44bc05035e4320ce23f772639990e.tar.bz2
expr.c (expand_expr, [...]): Do not try to optimize a aggregate address which has VOIDmode.
* expr.c (expand_expr, case ARRAY_REF, COMPONENT_REF, BIT_FIELD_REF): Do not try to optimize a aggregate address which has VOIDmode. Mirrors March 23 change to expand_assignment. From-SVN: r26307
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index d7f87c5..8d5a540 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6417,8 +6417,11 @@ expand_expr (exp, target, tmode, modifier)
#endif
}
+ /* A constant address in TO_RTX can have VOIDmode, we must not try
+ to call force_reg for that case. Avoid that case. */
if (GET_CODE (op0) == MEM
&& GET_MODE (op0) == BLKmode
+ && GET_MODE (XEXP (op0, 0)) != VOIDmode
&& bitsize
&& (bitpos % bitsize) == 0
&& (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0