https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110835
--- Comment #1 from Ed Catmur <ed at catmur dot uk> --- Motivation is https://github.com/boostorg/exception/blob/b039b4ea18ef752d0c1684b3f715ce493b778060/include/boost/exception/detail/exception_ptr.hpp#L550 ; the half-reduced code is: #include <boost/exception_ptr.hpp> struct S {}; int main() { auto ep = boost::copy_exception(S()); for (int i = 0; i != 100000; ++i) try { boost::rethrow_exception(ep); } catch (...) {} }