https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101244
Mathias Stearn <redbeard0531 at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |redbeard0531 at gmail dot com --- Comment #3 from Mathias Stearn <redbeard0531 at gmail dot com> --- With gcc trunk it seems to work fine when you pull it out of the `co_return` but still generates incorrect code as initially reported https://godbolt.org/z/6x7cKM9nG #ifdef FAIL // fails co_return (b ? co_await g(S{}) : 2); #else // works auto x = b ? co_await g(S{}) : 2; co_return x; #endif