diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 1999-11-29 22:44:52 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1999-11-29 17:44:52 -0500 |
commit | ce64861eed4220d7a75b09079c13f42553d9b804 (patch) | |
tree | 2f7f70c755945f92236607c721fce9fb6e290754 /gcc/expr.c | |
parent | a2b991617429aac42a11009c9881ad216fc7dee1 (diff) | |
download | gcc-ce64861eed4220d7a75b09079c13f42553d9b804.zip gcc-ce64861eed4220d7a75b09079c13f42553d9b804.tar.gz gcc-ce64861eed4220d7a75b09079c13f42553d9b804.tar.bz2 |
expr.c (store_constructor_field): If bit position is not multiple of alignment of TARGET's mode, use BLKmode.
* expr.c (store_constructor_field): If bit position is not multiple
of alignment of TARGET's mode, use BLKmode.
From-SVN: r30713
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -4040,9 +4040,14 @@ store_constructor_field (target, bitsize, bitpos, && (bitpos == 0 || GET_CODE (target) == MEM)) { if (bitpos != 0) - target = change_address (target, VOIDmode, - plus_constant (XEXP (target, 0), - bitpos / BITS_PER_UNIT)); + target + = change_address (target, + GET_MODE (target) == BLKmode + || 0 != (bitpos + % GET_MODE_ALIGNMENT (GET_MODE (target))) + ? BLKmode : VOIDmode, + plus_constant (XEXP (target, 0), + bitpos / BITS_PER_UNIT)); store_constructor (exp, target, align, cleared); } else |