https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98704
--- Comment #1 from Michael Krause <m.kra...@tu-harburg.de> --- Created attachment 49985 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49985&action=edit A possible fix? Would this be the proper way to fix the problem? That is, instead of generating a simple "promise.unhandled_exception()" call, generate: try { promise.unhandled_exception(); } catch(...) { resume_fn_ptr = 0; // ensure that done() returns true throw; } Seems to fix my problem, but then I don't know the gcc code base; maybe the change has undesired side effects. If somebody can confirm this is the way to go, I would be willing to provide a cleaned-up, mergable version including test cases etc...