[Bug c++/119916] [15/16 Regression] folly (2025.04.14.00 and earlier): coroutine tests fail with GCC 15 since r15-3153-g68ee624bc52ba1

iains at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Apr 28 14:28:48 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119916

--- Comment #13 from Iain Sandoe <iains at gcc dot gnu.org> ---

[IMO] I would suggest that GCC's behaviour (now) is the correct one [intended
by the design].


Consider a request such as made by Ville "I want the ramp return object to be
able to tell me if the coroutine suspended or completed".  Noting that there
are several ways in which a coroutine *might* run to completion before the ramp
returns.

That check cannot be made by looking at the promise object, since that object
has been destroyed in a completed coroutine (and, of course, even trying to
look at the promise - or continuing via a handle is UB).

So to fulfil such a request, the information must reasonably be presented in
the ramp's return object - and that implies that the coroutine body must be
able to update said object.  [Of course, one can consider other mechanisms with
additional shared state - but that seems terribly convoluted when we already
have a suitable place].


More information about the Gcc-bugs mailing list