https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92038
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Store-merging sees:
MEM[(struct &)&D.16119] ={v} {CLOBBER};
MEM[(struct _Uninitialized *)&D.16119] ={v} {CLOBBER};
MEM[(struct _Uninitialized *)&D.16119]._M_storage = 0;
MEM[(struct _Variant_storage *)&D.16119]._M_index = 0;
so perhaps we could just add handling of clobbers to store-merging, similarly
like we already handle = {} initializers; of course never remove the clobbers,
but just assume that zeros (or anything else) can be stored in the bytes that
actually weren't stored.