https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95440
Bug ID: 95440
Summary: [coroutines] ICE with static members in promise_type
Product: gcc
Version: 10.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: bruck.michael at googlemail dot com
Target Milestone: ---
https://gcc.godbolt.org/z/PoAYhX
#include <coroutine>
struct task
{
struct promise_type
{
auto get_return_object() const { return task{}; }
static constexpr std::suspend_never initial_suspend() { return
{}; }
/*static*/ constexpr std::suspend_never final_suspend() {
return {}; }
/*static*/ constexpr void return_void() {}
/*static*/ constexpr void unhandled_exception() {}
};
};
task
test_task()
{
co_await std::suspend_always{};
}
auto t = test_task();
int main() {}