]> gcc.gnu.org Git - gcc.git/commit
coroutines: Look through NOPs for awaiter variables [PR 99575].
authorIain Sandoe <iain@sandoe.co.uk>
Sat, 2 Oct 2021 11:44:01 +0000 (12:44 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 3 Oct 2021 19:41:59 +0000 (20:41 +0100)
commit0ee1ab15c237ffb50be1a5ce9c5e542b16df4d12
treedc2bda9d2a7656bff68d73c083446387ea3befaa
parent8fbe1b18ed090a026d08f0b0e5f8cd56d652125d
coroutines: Look through NOPs for awaiter variables [PR 99575].

There was a missing STRIP_NOPS which meant that, in some cases,
an awaiter variable could be hidden by a view-convert-expr.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
PR c++/99575

gcc/cp/ChangeLog:

* coroutines.cc (build_co_await): Strip NOPs from
candidate awaiter expressions before testing to see
if they need a temporary.

gcc/testsuite/ChangeLog:

* g++.dg/coroutines/pr99575.C: New test.
gcc/cp/coroutines.cc
gcc/testsuite/g++.dg/coroutines/pr99575.C [new file with mode: 0644]
This page took 0.061126 seconds and 5 git commands to generate.