https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102401
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|INVALID |--- Last reconfirmed| |2021-09-20 Ever confirmed|0 |1 Status|RESOLVED |REOPENED --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- We need to fix PR78620 first. I think one thing is adding some CONSTRUCTOR_ZERO_PADDING flag on CONSTRUCTORs (meaning that padding is zero initialized), propagate it through the FE and handle in constexpr there and handle that during gimplification, either by __builtin_clear_padding or pre-zeroing the whole memory (TREE_STATIC vars don't need that of course). And then there is a question if we don't need further middle-end changes, because a mere struct assignment in the GIMPLE IL doesn't guarantee copying of the padding bits.