From 7ffc9761ca08a1576add6f098c01e5504735e363 Mon Sep 17 00:00:00 2001 From: "J\"orn Rennecke" Date: Mon, 2 Dec 2002 14:44:17 +0000 Subject: [PATCH] expmed.c (store_bit_field): Use int_mode_for_mode to find corresponding mode of non-integer mode... * expmed.c (store_bit_field): Use int_mode_for_mode to find corresponding mode of non-integer mode, unless it is VOIDmode. From-SVN: r59716 --- gcc/ChangeLog | 5 +++++ gcc/expmed.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f09b4dba687..64558f1047e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Dec 2 14:43:22 2002 J"orn Rennecke + + * expmed.c (store_bit_field): Use int_mode_for_mode to find + corresponding mode of non-integer mode, unless it is VOIDmode. + 2002-12-02 Kazu Hirata * config/h8300/h8300.md (stm_h8300s_2): New. 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. */ -- 2.30.2