From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 326EE3856DCB; Tue, 18 Apr 2023 20:45:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 326EE3856DCB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1681850757; bh=hYHwt0jcZlnUyTqONsdmfiMS4tUIUL7h33htVmwidIw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mXPCb0/tgmWusaAbY0Sb7UuNM7O+DsVqMoaH2Omxaqal3WEZgbZLI9UymgMce2/tv xQaX1sIhUUCcWk/wUH13TEe7rPRBvk5yTw4VdGEXRh2YBnB75ib3JfbiB3H1ceXdSb AoGUThikrSAJWzz3Z5+K3MkGtqJwRZn2NoDvEY14= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105406] [11/12 Regression] coroutines: since 11.3 co_await attempts to copy a move-only value when await_transform(T &) exists Date: Tue, 18 Apr 2023 20:45:56 +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: 11.3.0 X-Bugzilla-Keywords: C++-coroutines, 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: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105406 --- Comment #4 from CVS Commits --- The releases/gcc-12 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:6fd32842404ac1a3cd98189f61d93c5bc9c8680c commit r12-9435-g6fd32842404ac1a3cd98189f61d93c5bc9c8680c Author: Jason Merrill Date: Wed Mar 15 17:02:15 2023 -0400 c++: co_await and move-only type [PR105406] Here we were building a temporary MoveOnlyAwaitable to hold the result = of evaluating 'o', but since 'o' is an lvalue we should build a reference instead. PR c++/105406 gcc/cp/ChangeLog: * coroutines.cc (build_co_await): Handle lvalue 'o'. gcc/testsuite/ChangeLog: * g++.dg/coroutines/co-await-moveonly1.C: New test.=