http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57908

--- Comment #4 from Yann Droneaud <yann at droneaud dot fr> ---
(In reply to Andrew Pinski from comment #2)
> Your test program is not fully testing things correctly.
>      kind         name              address   size   alignment   required
> >   object |       u8_5 |     0x7fffefdd4810 |    3 |        16 |        1
> >   object |       u8_6 |     0x7fffefdd4800 |    2 |      2048 |        1
> >   object |       u8_7 |     0x7fffefdd47ff |    1 |         1 |        1
> 
> Shows why.  There are two variables right next to each other but the
> alignment recorded is 2048 but that was just accidental.  The alignment of
> u8_6 is 16 due to the next variable at 10.

Have you noticed that u8_7 is an array of 1 element only ?
Array of 1 element (bytes) only are not aligned on 16 bytes boundary.
Array of 2 bytes and greater get aligned on 16 bytes boundary.

Should I show another test case ?

Reply via email to