summaryrefslogtreecommitdiff
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2005-01-26 15:18:14 -0800
committerRichard Henderson <rth@gcc.gnu.org>2005-01-26 15:18:14 -0800
commit78ef1e3d9fbe214ead3c117ec54a5c10da91a0df (patch)
treec288833747703ad1533d198a783c87c3ac5711f2 /gcc/expmed.c
parent5596990fafed164e66c78bb1f4ec82eb58ba0042 (diff)
downloadgcc-78ef1e3d9fbe214ead3c117ec54a5c10da91a0df.tar.gz
re PR middle-end/18008 (Duplicate mask on bitfield insertion)
PR middle-end/18008 * c-decl.c (finish_struct): Set DECL_MODE after resetting a field's type. * expmed.c (store_fixed_bit_field): Create a paradoxical subreg if we don't need the bits above those present in the current mode. * expr.c (store_field): Strip conversions to odd-bit-sized types if the destination field width matches. From-SVN: r94290
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 1091c454064..084a987fdc0 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -878,7 +878,7 @@ store_fixed_bit_field (rtx op0, unsigned HOST_WIDE_INT offset,
if (GET_MODE (value) != mode)
{
if ((REG_P (value) || GET_CODE (value) == SUBREG)
- && GET_MODE_SIZE (mode) < GET_MODE_SIZE (GET_MODE (value)))
+ && GET_MODE_SIZE (GET_MODE (value)) <= bitsize)
value = gen_lowpart (mode, value);
else
value = convert_to_mode (mode, value, 1);