diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-08 16:54:45 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-08 16:54:45 +0000 |
commit | c3ba908e6598dd5ef8efd73ccb9cc43d04fcfb72 (patch) | |
tree | 56aa58fac2a26580dde976153e0dfb09caa2cf52 /gcc | |
parent | 6a0ae348a7ba03b19c659fc5665a006253077b2a (diff) | |
download | gcc-c3ba908e6598dd5ef8efd73ccb9cc43d04fcfb72.tar.gz |
* expr.c (store_expr): When converting a CONST_INT for storage
in a SUBREG, convert it to both SUBREG modes before stripping
the SUBREG.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46081 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/expr.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 182fd9c931d..f9f029800fb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2001-10-08 Richard Henderson <rth@redhat.com> + * expr.c (store_expr): When converting a CONST_INT for storage + in a SUBREG, convert it to both SUBREG modes before stripping + the SUBREG. + +2001-10-08 Richard Henderson <rth@redhat.com> + * varasm.c (restore_varasm_status): New. * function.h: Declare it. * function.c (pop_function_context_from): Call it. diff --git a/gcc/expr.c b/gcc/expr.c index 52f9cc0f2e0..130b3e1195d 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -4152,9 +4152,13 @@ store_expr (exp, target, want_value) /* If TEMP is a VOIDmode constant, use convert_modes to make sure that we properly convert it. */ if (CONSTANT_P (temp) && GET_MODE (temp) == VOIDmode) - temp = convert_modes (GET_MODE (SUBREG_REG (target)), - TYPE_MODE (TREE_TYPE (exp)), temp, - SUBREG_PROMOTED_UNSIGNED_P (target)); + { + temp = convert_modes (GET_MODE (target), TYPE_MODE (TREE_TYPE (exp)), + temp, SUBREG_PROMOTED_UNSIGNED_P (target)); + temp = convert_modes (GET_MODE (SUBREG_REG (target)), + GET_MODE (target), temp, + SUBREG_PROMOTED_UNSIGNED_P (target)); + } convert_move (SUBREG_REG (target), temp, SUBREG_PROMOTED_UNSIGNED_P (target)); |