On Fri, Apr 24, 2015 at 06:34:28PM -0400, Jason Merrill wrote:
> On 04/20/2015 10:35 AM, Jakub Jelinek wrote:
> >Wonder what will happen if finalize_type_size or fixup_attribute_variants
> >is called on a type variant with TYPE_USER_ALIGN before it is called
> >on the TYPE_MAIN_VARIANT; I'd guess that in that case all the variants
> >including the main variant would be marked as TYPE_USER_ALIGN and might have
> >incorrect TYPE_ALIGN.
> 
> Good point.  Changing layout_type to always work on the TYPE_MAIN_VARIANT
> passes testing:

LGTM.

> commit 0f520c7c862aa3c8850c3d3c024d19e4b8f1a757
> Author: Jason Merrill <ja...@redhat.com>
> Date:   Fri Apr 10 18:13:56 2015 -0400
> 
>       PR c++/65734
>     gcc/
>       * stor-layout.c (layout_type): Layout the TYPE_MAIN_VARIANT.
>       (finalize_type_size): Respect TYPE_USER_ALIGN.
>       (layout_type) [ARRAY_TYPE]: Likewise.
>     gcc/cp/
>       * class.c (fixup_attribute_variants): Respect TYPE_USER_ALIGN.

        Jakub

Reply via email to