https://gcc.gnu.org/g:7bba8d48ea556a03bdc4e9076740b83d3db6599e
commit r16-962-g7bba8d48ea556a03bdc4e9076740b83d3db6599e Author: Iain Sandoe <i...@sandoe.co.uk> Date: Sun May 25 12:14:13 2025 +0100 c++, coroutines: Delete now unused code for parm guards. Since r16-775-g18df4a10bc9694 we use nested cleanups to handle parameter copy destructors in the ramp (and pass a list of cleanups required to the actor which will only be invoked if the parameter copies were all correctly built - and therefore does not need to guard destructors either. This deletes the provisions for frame parameter copy destructor guards. gcc/cp/ChangeLog: * coroutines.cc (analyze_fn_parms): No longer create a parameter copy guard var. * coroutines.h (struct param_info): Remove the entry for the parameter copy destructor guard. Signed-off-by: Iain Sandoe <i...@sandoe.co.uk> Diff: --- gcc/cp/coroutines.cc | 12 +----------- gcc/cp/coroutines.h | 1 - 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/gcc/cp/coroutines.cc b/gcc/cp/coroutines.cc index b1e555cb3365..64a0a344349e 100644 --- a/gcc/cp/coroutines.cc +++ b/gcc/cp/coroutines.cc @@ -4089,17 +4089,7 @@ analyze_fn_parms (tree orig, hash_map<tree, param_info> *param_uses) } parm.field_id = name; if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (parm.frame_type)) - { - char *buf = xasprintf ("_Coro_q%u_%s_live", parm_num, - DECL_NAME (arg) ? IDENTIFIER_POINTER (name) - : "__unnamed"); - parm.guard_var - = coro_build_artificial_var (UNKNOWN_LOCATION, get_identifier (buf), - boolean_type_node, orig, - boolean_false_node); - free (buf); - parm.trivial_dtor = false; - } + parm.trivial_dtor = false; else parm.trivial_dtor = true; } diff --git a/gcc/cp/coroutines.h b/gcc/cp/coroutines.h index d13bea0f302b..10698cf2e129 100644 --- a/gcc/cp/coroutines.h +++ b/gcc/cp/coroutines.h @@ -9,7 +9,6 @@ struct param_info vec<tree *> *body_uses; /* Worklist of uses, void if there are none. */ tree frame_type; /* The type used to represent this parm in the frame. */ tree orig_type; /* The original type of the parm (not as passed). */ - tree guard_var; /* If we need a DTOR on exception, this bool guards it. */ tree fr_copy_dtor; /* If we need a DTOR on exception, this is it. */ bool by_ref; /* Was passed by reference. */ bool pt_ref; /* Was a pointer to object. */