https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95505
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Iain D Sandoe <ia...@gcc.gnu.org>: https://gcc.gnu.org/g:a59a15bcd27fa626b2b0912a1d7abd6df4f3d6cf commit r10-8334-ga59a15bcd27fa626b2b0912a1d7abd6df4f3d6cf Author: Iain Sandoe <i...@sandoe.co.uk> Date: Sun Jun 21 19:11:23 2020 +0100 coroutines: Update handling and failure for g-r-o-o-a-f [PR95505] The actual issue is that (in the testcase) std::nothrow is not available. So update the handling of the get-return-on-alloc-fail to include the possibility that std::nothrow might not be available. gcc/cp/ChangeLog: PR c++/95505 * coroutines.cc (morph_fn_to_coro): Update handling of get-return-object-on-allocation-fail and diagnose missing std::nothrow. gcc/testsuite/ChangeLog: PR c++/95505 * g++.dg/coroutines/pr95505.C: New test. (cherry picked from commit 445d8da5fbd10e32f8ea470bd9ac02faba8fd718)