back-port the coroutine part of this.
Some issues caught by a check from another patch:
In build_ramp_function, we're assigning REFERENCE_TYPE things, so we need to
build the assignment directly rather than rely on functions that implement
C++ semantics.
gcc/cp/ChangeLog:
* coroutines.cc (cp_coroutine_transform::build_ramp_function): Build
INIT_EXPR directly.
(cherry picked from commit
dd3f3c71df66ed6fd3872ab780f5813831100d1c)
if (parm.rv_ref || parm.pt_ref)
/* Initialise the frame reference field directly. */
- r = cp_build_modify_expr (fn_start, TREE_OPERAND (fld_idx, 0),
- INIT_EXPR, arg, tf_warning_or_error);
+ r = build2 (INIT_EXPR, TREE_TYPE (arg),
+ TREE_OPERAND (fld_idx, 0), arg);
else
{
r = forward_parm (arg);