From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 26787385800A; Thu, 16 Mar 2023 12:01:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 26787385800A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678968086; bh=PMO7rrziOjADtsrrUFhCJ9vX/K8OIwkd/+faX73meOM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lxQFfrPPPTfOUsDmkH3S32inVuc83x43/ugyJI20J9gB6CtU8wgdQFBRdPEfURtom eyNdQVIRffRnW1vlWIOOpfO17zCh44zEmQjRGYOr5ELx56M/nUN0957gzWmgj97JuY u6Yk9DBDNoS8YPlcweNSavkysklIjImlJbwJY9v4= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105406] [11/12/13 Regression] coroutines: since 11.3 co_await attempts to copy a move-only value when await_transform(T &) exists Date: Thu, 16 Mar 2023 12:01:25 +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 #3 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:d0ed0690f1e86621a5cb62eec1d144036feb16f8 commit r13-6711-gd0ed0690f1e86621a5cb62eec1d144036feb16f8 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.=