https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110683

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to CTC from comment #3)
> The reduced program is
> 
> # cat mss.i
> struct a {
>   char b;
>   int c;
> };
> union {
>   struct a b;
>   short c;
> } d = {8, 1};
> void main() { printf("%d\n", d.c); }

This reduced case shows that -fpacked-struct will change the layout of struct a
and nothing more. Without the option there is some padding bytes which are
zero. Also also this reduced testcase depends on the endian of the target.

Maybe the original testcase has similar issues with the unions.

Reply via email to