https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116346
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> --- Created attachment 62378 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62378&action=edit attempt I tried this approach, but it breaks constinit11.C, which makes sense because __cxa_atexit isn't (and can't be) constexpr. But I don't think it's possible for a conforming program to notice the difference; the ordering only matters if foo throws, at which point we're about to terminate and don't actually run the cleanup anyway.
