https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107500
--- Comment #24 from R. Diez <rdiezmail-gcc at yahoo dot de> --- In case somebody else wants to patch their GCC 12.2, here is the slightly-modified patch for convenience: https://github.com/rdiez/DebugDue/blob/master/Toolchain/Patches/Gcc12EhGlobalsAtexit.patch