Hello,

I had forgotten to run the Ada test suite when I submitted the previous version 
of this patch.
And indeed there were some Ada test cases failing because in Ada packed 
structures are
like bit fields, but without the DECL_BIT_FIELD_TYPE attribute.

Please find attached the updated version of this patch.

Boot-strapped and regression-tested on x86_64-linux-gnu.
Ok for trunk?

Bernd.

> On Mon, 18 Nov 2013 11:37:05, Bernd Edlinger wrote:
>
> 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-25  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-25  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