diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-11-19 18:48:17 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-11-19 18:48:17 -0500 |
commit | bbd6cf73c6d11877766f44038aa8e159c4265800 (patch) | |
tree | 2ea5dcfe7a849bf623988854e67aae5afe654917 /gcc | |
parent | 9061e4cdc9c63ff6f57f60bf8df585c14526bb89 (diff) | |
download | gcc-bbd6cf73c6d11877766f44038aa8e159c4265800.zip gcc-bbd6cf73c6d11877766f44038aa8e159c4265800.tar.gz gcc-bbd6cf73c6d11877766f44038aa8e159c4265800.tar.bz2 |
(store_field): Convert EXP to MODE before calling store_bit_field.
From-SVN: r6119
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/expr.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -3028,6 +3028,13 @@ store_field (target, bitsize, bitpos, mode, exp, value_mode, || (STRICT_ALIGNMENT && bitpos % GET_MODE_ALIGNMENT (mode) != 0)) { rtx temp = expand_expr (exp, NULL_RTX, VOIDmode, 0); + + /* Unless MODE is VOIDmode or BLKmode, convert TEMP to + MODE. */ + if (mode != VOIDmode && mode != BLKmode + && mode != TYPE_MODE (TREE_TYPE (exp))) + temp = convert_modes (mode, TYPE_MODE (TREE_TYPE (exp)), temp, 1); + /* Store the value in the bitfield. */ store_bit_field (target, bitsize, bitpos, mode, temp, align, total_size); if (value_mode != VOIDmode) |