https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95050

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Iain D Sandoe
<ia...@gcc.gnu.org>:

https://gcc.gnu.org/g:ac9b05305d376cfa391dd57a46515cbdc165f094

commit r10-8261-gac9b05305d376cfa391dd57a46515cbdc165f094
Author: Iain Sandoe <i...@sandoe.co.uk>
Date:   Sun Jun 7 13:47:54 2020 +0100

    coroutines: Wrap co_await in a target expr where needed [PR95050]

    Since the co_await expression is mostly opaque to the existing
    machinery, we were hiding the details of the await_resume return
    value.  If that needs to be wrapped in a target expression, then
    emulate this with the whole co_await.  Similarly, if the await
    expression we build in response to co_await p.yield_value (e)
    is wrapped in a target expression, then we need to transfer that
    wrapper to the resultant CO_YIELD_EXPR (which is, itself, just
    a proxy for the underlying co_await).

    gcc/cp/ChangeLog:

            PR c++/95050
            * coroutines.cc (build_co_await): Wrap the co_await expression
            in a TARGET_EXPR, where needed.
            (finish_co_yield_expr): Likewise.

    gcc/testsuite/ChangeLog:

            PR c++/95050
            * g++.dg/coroutines/pr95050.C: New test.

    (cherry picked from commit 324276ff9b1aa5128e5cb9f5d43182d1ebab0752)

Reply via email to