https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124356
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |c
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
struct r test = {.D.2966={.D.2965={.x=x, .y=y}}};
vs
struct r test = {.z=0, .D.2966={.D.2965={.x=x, .y=y}}};
or:
<<cleanup_point struct r test = {.z=0};>>;
vs:
<<cleanup_point struct r test = {};>>;
Which then does the zeroing.
>GCC insists to redundantly zero the entire struct
I am not sure this is not unexpected here.
Note "inactive union member" I think only matters for C++, C defines unions
slightly different.