aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-03-23 22:33:35 +0000
committerJeff Law <law@gcc.gnu.org>1999-03-23 15:33:35 -0700
commit9a7b9f4f060532cc69ad4902e0298ee942a2846f (patch)
tree78bad6de7c6f96607b2fba945303cffa7aacfe3d /gcc/expr.c
parent8ebf19db4678c51326b8b6642b07eeb5ce2ef036 (diff)
downloadgcc-9a7b9f4f060532cc69ad4902e0298ee942a2846f.zip
gcc-9a7b9f4f060532cc69ad4902e0298ee942a2846f.tar.gz
gcc-9a7b9f4f060532cc69ad4902e0298ee942a2846f.tar.bz2
expr.c (expand_assignment): Do not try to optimize a aggregate address which has VOIDmode.
* expr.c (expand_assignment): Do not try to optimize a aggregate address which has VOIDmode. From-SVN: r25934
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 a09f269..ab53314 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3276,8 +3276,11 @@ expand_assignment (to, from, want_value, suggest_reg)
#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 (to_rtx) == MEM
&& GET_MODE (to_rtx) == BLKmode
+ && GET_MODE (XEXP (to_rtx, 0)) != VOIDmode
&& bitsize
&& (bitpos % bitsize) == 0
&& (bitsize % GET_MODE_ALIGNMENT (mode1)) == 0