https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109682
--- Comment #3 from Arsen Arsenović <arsen at gcc dot gnu.org> ---
further reduced reproducer (this one should also be fully valid):
#include <coroutine>
#include <new>
struct test
{
test () {}
test (int) {}
struct promise_type {
test get_return_object () { return {}; }
// vvv
static int get_return_object_on_allocation_failure () { return {}; }
std::suspend_never initial_suspend () noexcept { return {}; }
std::suspend_never final_suspend () noexcept { return {}; }
void return_void () {}
void unhandled_exception () {}
};
};
test
f () { co_return; }
int
main ()
{
f ();
}