https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109268
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2024-03-16 Status|UNCONFIRMED |NEW --- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I have a patch which fixes PR 19661 except it does not fix this one fully. I will also note LLVM also still does the guard variable here too even with the removal of the __cxa_atexit call. We need another way to remove the empty code between __cxa_guard_acquire/__cxa_guard_release . <bb 3> [local count: 354334800]: _2 = __cxa_guard_acquire (&_ZGVZ1fvE4data); if (_2 != 0) goto <bb 4>; [33.00%] else goto <bb 5>; [67.00%] <bb 4> [local count: 116930483]: # DEBUG this => &data # DEBUG INLINE_ENTRY __ct data ={v} {CLOBBER(bob)}; # DEBUG this => NULL __cxa_guard_release (&_ZGVZ1fvE4data); <bb 5> [local count: 1073741824]: