https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95117
Bug ID: 95117 Summary: Segmentation fault with static await_ready() or await_resume() Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: oficsu at gmail dot com Target Milestone: --- Created attachment 48527 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48527&action=edit Minimal example The attached archive contains a minimal example and a command that leads to an internal compiler error in GCC 10 and later Also, you can see the error on godbolt for gcc 10.1.0: https://godbolt.org/z/CsJ4nG The same error is reproducing in trunk version from godbolt: https://godbolt.org/z/CsJ4nG Working Draft contains the following definitions: await-ready is the expression e.await_ready(), contextually converted to bool. ... await-suspend is the expression e.await_suspend(h), which shall be a prvalue of type void, bool, or std::coroutine_handle<Z> for some type Z. ... await-resume is the expression e.await_resume(). Most likely the definition await_ready() and await_resume() as static is ill-formed and should lead to a compilation error, but not to an segmentation fault. BUT, please note that await-suspend is defined in the same way, but this is compiled fine, so I'm not sure which behavior is right