diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-02 14:44:17 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-02 14:44:17 +0000 |
commit | 0e6b9583c558b3f068d9cc744f46070dace52e03 (patch) | |
tree | 23939f2b8962a0fdddce031ee5be1fefe59c83b6 /gcc/expmed.c | |
parent | 0289b623651bbc157a6c174f4a939494e56879d3 (diff) | |
download | gcc-0e6b9583c558b3f068d9cc744f46070dace52e03.tar.gz |
* expmed.c (store_bit_field): Use int_mode_for_mode to find
corresponding mode of non-integer mode, unless it is VOIDmode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59716 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 6b365b9e0ad..d1c89f2f1f2 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -535,7 +535,9 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, total_size) structure fields. */ if (GET_MODE_CLASS (GET_MODE (value)) != MODE_INT && GET_MODE_CLASS (GET_MODE (value)) != MODE_PARTIAL_INT) - value = gen_lowpart (word_mode, value); + value = gen_lowpart ((GET_MODE (value) == VOIDmode + ? word_mode : int_mode_for_mode (GET_MODE (value))), + value); /* Now OFFSET is nonzero only if OP0 is memory and is therefore always measured in bytes. */ |