From: Jim Wilson Date: Sat, 25 Feb 1995 01:45:43 +0000 (-0800) Subject: (expand_expr, case COMPONENT_REF): Don't fetch unaligned X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9409c3ac37ccfd7b98035d2629531eec39f9ea4;p=gcc.git (expand_expr, case COMPONENT_REF): Don't fetch unaligned field if we only want its address. From-SVN: r9069 --- diff --git a/gcc/expr.c b/gcc/expr.c index d46498e5f0f..cd0472d1cb7 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -4761,16 +4761,16 @@ expand_expr (exp, target, tmode, modifier) (which we know to be the width of a basic mode), then storing into memory, and changing the mode to BLKmode. */ if (mode1 == VOIDmode - || (mode1 != BLKmode && ! direct_load[(int) mode1] - && modifier != EXPAND_CONST_ADDRESS - && modifier != EXPAND_SUM && modifier != EXPAND_INITIALIZER) || GET_CODE (op0) == REG || GET_CODE (op0) == SUBREG - /* If the field isn't aligned enough to fetch as a memref, - fetch it as a bit field. */ - || (SLOW_UNALIGNED_ACCESS - && TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode)) - || (SLOW_UNALIGNED_ACCESS - && bitpos % GET_MODE_ALIGNMENT (mode) != 0)) + || (modifier != EXPAND_CONST_ADDRESS + && modifier != EXPAND_SUM + && modifier != EXPAND_INITIALIZER + && ((mode1 != BLKmode && ! direct_load[(int) mode1]) + /* If the field isn't aligned enough to fetch as a memref, + fetch it as a bit field. */ + || (SLOW_UNALIGNED_ACCESS + && ((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode)) + || (bitpos % GET_MODE_ALIGNMENT (mode) != 0)))))) { enum machine_mode ext_mode = mode;