diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-11-23 16:00:26 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-11-23 16:00:26 +0000 |
commit | ee88e690a27cfbe3cbb2216e50dec455754bc9a2 (patch) | |
tree | a14567480c026683cf12be27a8dd0c65837a7be2 /gcc/expmed.c | |
parent | afa22e29eed02941a7d6d21f539ce5fb8716eba1 (diff) | |
download | gcc-ee88e690a27cfbe3cbb2216e50dec455754bc9a2.zip gcc-ee88e690a27cfbe3cbb2216e50dec455754bc9a2.tar.gz gcc-ee88e690a27cfbe3cbb2216e50dec455754bc9a2.tar.bz2 |
re PR rtl-optimization/55388 (ICE in int_mode_for_mode at stor-layout.c:423)
PR rtl-optimization/55388
* alias.c (nonoverlapping_component_refs_p): Handle bitfields.
* emit-rtl.c (adjust_address_1): Deal with VOIDmode early.
* expmed.c (store_bit_field): Turn the call to adjust_address
into a call to adjust_bitfield_address_size.
From-SVN: r193760
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index 11f1550..fc29ac4 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -869,19 +869,20 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize, if (MEM_P (str_rtx) && bitregion_start > 0) { enum machine_mode bestmode; - unsigned HOST_WIDE_INT offset; + HOST_WIDE_INT offset, size; gcc_assert ((bitregion_start % BITS_PER_UNIT) == 0); offset = bitregion_start / BITS_PER_UNIT; bitnum -= bitregion_start; + size = (bitnum + bitsize + BITS_PER_UNIT - 1) / BITS_PER_UNIT; bitregion_end -= bitregion_start; bitregion_start = 0; bestmode = get_best_mode (bitsize, bitnum, bitregion_start, bitregion_end, MEM_ALIGN (str_rtx), VOIDmode, MEM_VOLATILE_P (str_rtx)); - str_rtx = adjust_address (str_rtx, bestmode, offset); + str_rtx = adjust_bitfield_address_size (str_rtx, bestmode, offset, size); } if (!store_bit_field_1 (str_rtx, bitsize, bitnum, |