expmed.c (store_bit_field): Assert that BITREGION_START is a multiple of a unit before computing the offset...
* expmed.c (store_bit_field): Assert that BITREGION_START is a multiple of a unit before computing the offset in units. From-SVN: r185896
This commit is contained in:
parent
6c72a57c37
commit
77ac819e2a
|
@ -1,3 +1,8 @@
|
|||
2012-03-27 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* expmed.c (store_bit_field): Assert that BITREGION_START is a multiple
|
||||
of a unit before computing the offset in units.
|
||||
|
||||
2012-03-27 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/52720
|
||||
|
|
|
@ -828,8 +828,7 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
|||
/* Under the C++0x memory model, we must not touch bits outside the
|
||||
bit region. Adjust the address to start at the beginning of the
|
||||
bit region. */
|
||||
if (MEM_P (str_rtx)
|
||||
&& bitregion_start > 0)
|
||||
if (MEM_P (str_rtx) && bitregion_start > 0)
|
||||
{
|
||||
enum machine_mode bestmode;
|
||||
enum machine_mode op_mode;
|
||||
|
@ -839,6 +838,8 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
|||
if (op_mode == MAX_MACHINE_MODE)
|
||||
op_mode = VOIDmode;
|
||||
|
||||
gcc_assert ((bitregion_start % BITS_PER_UNIT) == 0);
|
||||
|
||||
offset = bitregion_start / BITS_PER_UNIT;
|
||||
bitnum -= bitregion_start;
|
||||
bitregion_end -= bitregion_start;
|
||||
|
|
Loading…
Reference in New Issue