]> gcc.gnu.org Git - gcc.git/commit
coroutines: Correct handling of references in parm copies [PR95350].
authorIain Sandoe <iain@sandoe.co.uk>
Mon, 1 Jun 2020 07:28:35 +0000 (08:28 +0100)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:09:32 +0000 (13:09 -0300)
commit4a8b80bf55680782b71892528be748c1e6fdc3f1
tree5baf05521ad5e8bb8759d0414616e40d0728ed71
parented91d55958cbb8292565ffd2af10e9cfb8c5870d
coroutines: Correct handling of references in parm copies [PR95350].

Adjust to handle rvalue refs the same way as clang, and to correct
the handling of moves when a copy CTOR is present.  This is one area
where we could make things easier for the end-user (as was implemented
before this change), however there needs to be agreement about when the
full statement containing a coroutine call ends (i.e. when the ramp
terminates or when the coroutine terminates).

gcc/cp/ChangeLog:

PR c++/95350
* coroutines.cc (struct param_info): Remove rv_ref field.
(build_actor_fn): Remove specifial rvalue ref handling.
(morph_fn_to_coro): Likewise.

gcc/testsuite/ChangeLog:

PR c++/95350
* g++.dg/coroutines/torture/func-params-08.C: Adjust test to
reflect that all rvalue refs are dangling.
* g++.dg/coroutines/torture/func-params-09-awaitable-parms.C:
Likewise.
* g++.dg/coroutines/pr95350.C: New test.
gcc/cp/coroutines.cc
gcc/testsuite/g++.dg/coroutines/pr95350.C [new file with mode: 0644]
gcc/testsuite/g++.dg/coroutines/torture/func-params-08.C
gcc/testsuite/g++.dg/coroutines/torture/func-params-09-awaitable-parms.C
This page took 0.070545 seconds and 6 git commands to generate.