[Bug c/57908] alignment of arrays allocated stack on amd64/x86_64: 16 bytes ?

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 16 15:03:00 GMT 2013


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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.



More information about the Gcc-bugs mailing list