On Fri, 10 Oct 2014, Jakub Jelinek wrote:

> Hi!
> 
> As the testcase shows, _Alignof can sometimes return smaller number
> than the minimum alignment.  That is because when laying out structures,
> fields with types with TYPE_USER_ALIGN set have also DECL_USER_ALIGN
> set and therefore neither BIGGEST_FIELD_ALIGNMENT nor ADJUST_FIELD_ALIGN
> is applied to them, but min_align_of_type was applying that unconditionally.
> 
> Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> trunk/4.9?
> 
> 2014-10-10  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR c/63495
>       * stor-layout.c (min_align_of_type): Don't decrease alignment
>       through BIGGEST_FIELD_ALIGNMENT or ADJUST_FIELD_ALIGN if
>       TYPE_USER_ALIGN is set.
> 
>       * gcc.target/i386/pr63495.c: New test.

OK.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to