Debian Codegraph @

gcc/testsuite/g++.dg/coroutines/coro-bad-alloc-02-no-op-new-nt.C

raw
1 // { dg-additional-options "-fsyntax-only -w" }
2
3 // check error for missing new (size, nothrow).
4
5 #define PROVIDE_NEW_SZT
6 #define PROVIDE_DEL_VP
7 #define PROVIDE_GROOAF
8
9 #include "coro1-allocators.h"
10
11 struct coro1
12 f () /* { dg-error {'coro1::promise_type::get_return_object_on_allocation_failure\(\)' is provided by 'std::__n4861::__coroutine_traits_impl<coro1, void>::promise_type' \{aka 'coro1::promise_type'\} but 'operator new' is not marked 'throw\(\)' or 'noexcept'} } */
13 {
14 co_return;
15 }