summaryrefslogtreecommitdiffstats
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-05 11:51:54 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-05 11:51:54 +0000
commit25ff63d0d77c3802ccd7cf5b3034db2361c588f9 (patch)
tree67847c0636c55f25eddb8f68742e1bd0f9c4c4a7 /gcc/expr.c
parentd0abb70195ab3bf04deafad7c5504f2ca267736e (diff)
downloadppe42-gcc-25ff63d0d77c3802ccd7cf5b3034db2361c588f9.tar.gz
ppe42-gcc-25ff63d0d77c3802ccd7cf5b3034db2361c588f9.zip
* expr.c (expand_expr, case COMPONENT_REF): When seeing if should use
bitfield operations, use STRICT_ALIGNMENT, not SLOW_UNALIGNED_ACCESS if EXPAND_CONST_ADDRESS or EXPAND_INITIALIZER. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 56d733f2d0f..88374f35ee3 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7541,7 +7541,10 @@ expand_expr (tree exp, rtx target, enum machine_mode tmode, enum expand_modifier
|| (mode1 != BLKmode
&& (((TYPE_ALIGN (TREE_TYPE (tem)) < GET_MODE_ALIGNMENT (mode)
|| (bitpos % GET_MODE_ALIGNMENT (mode) != 0))
- && SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op0)))
+ && ((modifier == EXPAND_CONST_ADDRESS
+ || modifier == EXPAND_INITIALIZER)
+ ? STRICT_ALIGNMENT
+ : SLOW_UNALIGNED_ACCESS (mode1, MEM_ALIGN (op0))))
|| (bitpos % BITS_PER_UNIT != 0)))
/* If the type and the field are a constant size and the
size of the type isn't the same size as the bitfield,
OpenPOWER on IntegriCloud