re PR middle-end/55438 (tmpdir-gcc.dg-struct-layout-1/t001 - t028, gcc.c-torture...
authorRichard Sandiford <rdsandiford@googlemail.com>
Wed, 28 Nov 2012 20:13:22 +0000 (20:13 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 28 Nov 2012 20:13:22 +0000 (20:13 +0000)
commit00efe3ea3c907b4d7b090da19add210432b3de2c
treeaaafc068a028daa1ab2ecddaa3afa63e83019d13
parent1099bb0a712134f8a43e06407292aa95f27c0e54
re PR middle-end/55438 (tmpdir-gcc.dg-struct-layout-1/t001 - t028,  gcc.c-torture/execute/991118-1.c, gcc.c-torture/execute/bf64-1.c, ICE)

gcc/
PR middle-end/55438
* expmed.c (simple_mem_bitfield_p): New function, extracted from
store_bit_field_1 and extract_bit_field_1.  Use GET_MODE_ALIGNMENT
rather than bitsize when checking the alignment.
(store_bit_field_1, extract_bit_field_1): Call it.
* stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
Don't limit ALIGN_.  Assume that memory is mapped in chunks of at
least word size, regardless of BIGGEST_ALIGNMENT.
(bit_field_mode_iterator::get_mode): Use GET_MODE_ALIGNMENT rather
than unit when checking the alignment.
(get_best_mode): Use GET_MODE_ALIGNMENT.

From-SVN: r193905
gcc/ChangeLog
gcc/expmed.c
gcc/stor-layout.c