Hi Jason,

I was looking at handling some backports to 11.x and 10.x for coroutines
code-gen fixes ...

> On 7 May 2021, at 04:11, Jason Merrill <ja...@redhat.com> wrote:
> 
> A change to check glvalue_p rather than specifically for TARGET_EXPR
> revealed issues with the coroutines code's use of the 'rvalue' function,
> which shouldn't be used on class glvalues, so I've removed those calls.
> 
> In build_co_await I just dropped them, because I don't see anything in the
> co_await specification that indicates that we would want to move from an
> lvalue result of operator co_await.  And simplified that code while I was
> touching it; cp_build_modify_expr (...INIT_EXPR...) will call the
> constructor.
> 
> In morph_fn_to_coro I changed the handling of the rvalue reference coroutine
> frame field to use move, to treat the rval ref as an xvalue.  I used
> forward_parm to pass the function parms to the constructor for the field.
> And I simplified the return handling so we get the desired rvalue semantics
> from the normal implicit move on return.

… this was eventually commited as 14ed21f8749 - do you think it should be
back-ported to 11? … 10? (I can handle it along with the ones I am doing, if
so).

thanks
Iain

Reply via email to