From 2a7cde5e464163c56b38a131ea71ff4788abf512 Mon Sep 17 00:00:00 2001 From: Gabriel Dos Reis Date: Sat, 30 Apr 2005 16:01:29 +0000 Subject: [PATCH] re PR target/18004 (ICE in output_constant_pool_2 for aligned(1) float in struct) * Apply: 2004-10-21 Aldy Hernandez PR target/18004. * expmed.c (store_bit_field): Pass original 'value' before recursing. From-SVN: r99036 --- gcc/ChangeLog | 9 +++++++++ gcc/expmed.c | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 597f907c9d11..b675b1cb2814 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2005-04-30 Gabriel Dos Reis + + * Apply: + 2004-10-21 Aldy Hernandez + + PR target/18004. + * expmed.c (store_bit_field): Pass original 'value' before + recursing. + 2005-04-22 Eric Botcazou * doc/invoke.texi (SPARC options): Document that -mapp-regs diff --git a/gcc/expmed.c b/gcc/expmed.c index 2274bdaacb0e..72ef6cef3070 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -299,6 +299,7 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, total_size) unsigned HOST_WIDE_INT bitpos = bitnum % unit; rtx op0 = str_rtx; int byte_offset; + rtx orig_value; enum machine_mode op_mode = mode_for_extraction (EP_insv, 3); @@ -532,6 +533,7 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, total_size) corresponding size. This can occur on a machine with 64 bit registers that uses SFmode for float. This can also occur for unaligned float structure fields. */ + orig_value = value; if (GET_MODE_CLASS (GET_MODE (value)) != MODE_INT && GET_MODE_CLASS (GET_MODE (value)) != MODE_PARTIAL_INT) value = gen_lowpart ((GET_MODE (value) == VOIDmode @@ -598,7 +600,7 @@ store_bit_field (str_rtx, bitsize, bitnum, fieldmode, value, total_size) /* Fetch that unit, store the bitfield in it, then store the unit. */ tempreg = copy_to_reg (op0); - store_bit_field (tempreg, bitsize, bitpos, fieldmode, value, + store_bit_field (tempreg, bitsize, bitpos, fieldmode, orig_value, total_size); emit_move_insn (op0, tempreg); return value; -- 2.47.2