https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124084
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Obvious workaround is to use -flifetime-dse=0 . (Note there a lot of C++ code out there that violates lifetime rules too; LLVM did until recently [I think within the last 6 months]).
