diff gcc/testsuite/g++.dg/coroutines/coro-missing-final-suspend.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/g++.dg/coroutines/coro-missing-final-suspend.C	Mon May 25 07:50:57 2020 +0900
@@ -0,0 +1,19 @@
+//  { dg-additional-options "-fsyntax-only -w" }
+#include "coro.h"
+
+// Check diagnostic return from missing promise initial suspend entry.
+
+#define MISSING_FINAL_SUSPEND
+#include "coro1-ret-int-yield-int.h"
+
+coro1
+my_coro () // { dg-error {no member named 'final_suspend' in} }
+{
+  co_return 0;
+}
+
+// check we have not messed up continuation of the compilation.
+template <class... Args>
+struct void_t_imp {
+  using type = void;
+};