On 4/19/20 3:35 PM, Iain Sandoe wrote:
Hi,

Coroutine ramp functions have synthesised return values (the
user-authored function body cannot have an explicit 'return').
The current implementation attempts to optimise by building
the return in-place, in the manner of C++17 code.  Clearly,
that was too ambitious and the fix builds a target expr for
the constructed version and passes that to finish_return_stmt.

This also means that we now get the same error messages as
non-coroutines code, for implicit use of deleted CTORs etc.

====

This is not part of PR94288, but the testcase for that also  has
the issue, so it’s preferable to apply this first.

tested on x86_64-darwin16,
OK if it passes regstrap on x86-64-Linux too?
thanks
Iain


gcc/cp/ChangeLog:

2020-04-19  Iain Sandoe  <i...@sandoe.co.uk>

        PR c++/94661
        * coroutines.cc (morph_fn_to_coro): Simplify return
        value computation.


ok, thanks

--
Nathan Sidwell

Reply via email to