1 // { dg-additional-options "-fsyntax-only -fexceptions -w" }
2
3 // Diagose bad coroutine function type.
4
5 #include "coro.h"
6
7 int
bad_coroutine(void)8 bad_coroutine (void)
9 {
10 co_yield 5; // { dg-error {unable to find the promise type for this coroutine} }
11 co_return;
12 }
13