From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9677A387086A; Mon, 1 Jun 2020 19:25:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9677A387086A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591039515; bh=CMaPwQoJkkt6X9L/UwV6TZcCBhjmmi/IexpU9Tuwqao=; h=From:To:Subject:Date:In-Reply-To:References:From; b=LQrOA0d5BSxX2bVEFTuadnsvfNa76C/JqLlPzcZpJJZYz/iD3+12C47RMgWWKfFPV yhKyXAzB2mJ3bK7U+LMkvSgB7zQX62SyW6gaXUlGUaa5r+oVdwaQaM9yVnxA2g4VUP ESqZQvezhCAbLicYema1icOolX/dBRjlacr4w2IM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95350] [coroutines] coroutines with move-only by-value parameters attempt to copy parameter instead of move it Date: Mon, 01 Jun 2020 19:25:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: iains at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2020 19:25:15 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95350 --- Comment #2 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:88f48e2967ead9be262483618238efa9c7c842ec commit r11-773-g88f48e2967ead9be262483618238efa9c7c842ec Author: Iain Sandoe Date: Mon Jun 1 08:28:35 2020 +0100 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.=