On 5/13/25 11:06 AM, Iain Sandoe wrote:
This could not be done as a cherry-pick from the trunk resolution.
Tested on x86_64-darwin, powerpc64le linux sparc9 solaris,
OK for 14.3 ?
thanks
Iain
--- 8< ---
This is a GCC-14 version of the same strategy as used on trunk, but
with the more wide-ranging code cleanups elided.
PR c++/113773
gcc/cp/ChangeLog:
* coroutines.cc (coro_rewrite_function_body): Do not set
initial_await_resume_called here.
(morph_fn_to_coro): Set it here, and introduce a new flag
that indicates we have not yet reached the ramp return.
This flag was not part of the fix on trunk, and could use more rationale.
+ gate = build2 (TRUTH_AND_EXPR, boolean_type_node, gate,
+ coro_before_return);
Doesn't the order of operands to the && need to be the other way around,
to avoid checking iarc_x after the coro state has been destroyed?
Jason