Hi,

On Fri, 15 Nov 2013 13:30:51, Richard Biener wrote:
>> That looks like always pretending it is a bit field.
>> But it is not a bit field, and bitregion_start=bitregion_end=0
>> means it is an ordinary value.
>
> I don't think it is supposed to mean that. It's supposed to mean
> "the access is unconstrained".
>

Ok, agreed, I did not regard that as a feature.
And apparently only the code path in expand_assigment
really has a problem with it.

So here my second attempt at fixing this.

Boot-strapped and regression-tested on x86_64-linux-gnu.

OK for trunk?


Thanks
Bernd.                                    
2013-11-18  Bernd Edlinger  <bernd.edlin...@hotmail.de>

        Fix C++0x memory model for unaligned fields in packed, aligned(4)
        structures with -fno-strict-volatile-bitfields on STRICT_ALIGNMENT
        targets like arm-none-eabi.
        * expr.c (expand_assignment): Handle normal fields like bit regions.

testsuite:
2013-11-18  Bernd Edlinger  <bernd.edlin...@hotmail.de>

        * gcc.dg/pr56997-4.c: New testcase.

Attachment: patch-unaligned-data.diff
Description: Binary data

Reply via email to