https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103839
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The right fix is IMHO to add #define CONSTRUCTOR_ZERO_PADDING(NODE) \ (CONSTRUCTOR_CHECK (NODE)->base.protected_flag) and handle that during gimplification etc. This is needed both for C++ where https://eel.is/c++draft/dcl.init#general-6 requires that zero initialization clears padding bits, so the FE should set it for zero initialization ctors, and I bet for D as well. gimplification should then ensure vars initialized by such CONSTRUCTORs have the padding bits cleared in whatever way is most efficient.