From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1EDA73870875; Wed, 22 Apr 2020 09:24:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1EDA73870875 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587547446; bh=jsfNXsGNzfbLkUiS7k20UzqL3ELOp2Wj44Z+J7zRVQ8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=q92ESz2+5hKhqIGpfrjuRTiITUHPrpBR6NXBhC6rVHzPGravnUqdu/HBLKCfo22l+ TYOS5HGt4I4nF6nKBZ0NV18jU3Jc1+L9AjI9gs6jZci9kwj0FGpeJiJCT3++KJapmz Cf2CcW9DVrHAKRkpE5RqMt84G1A1acHDvAgz5H+Q= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94682] coroutines: Promise param preview should get a reference to *this. Date: Wed, 22 Apr 2020 09:24:05 +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: wrong-code 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.0 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: Wed, 22 Apr 2020 09:24:06 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94682 --- Comment #1 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:38644f81babd04820daa9d622ea75eb68c066c86 commit r10-7868-g38644f81babd04820daa9d622ea75eb68c066c86 Author: Iain Sandoe Date: Wed Apr 22 09:49:20 2020 +0100 coroutines: Pass class reference to promise param preview [PR94682] As reported in the PR, per [dcl.fct.def.coroutine]/4 we should be passing a reference to the object to the promise parameter preview, and we are currently passing a pointer (this). Amend to pass the reference. gcc/cp/ChangeLog: 2020-04-22 Iain Sandoe PR c++/94682 * coroutines.cc (struct param_info): Add a field to note that the param is 'this'. (morph_fn_to_coro): Convert this to a reference before using it in the promise parameter preview. gcc/testsuite/ChangeLog: 2020-04-22 Iain Sandoe PR c++/94682 * g++.dg/coroutines/pr94682-preview-this.C: New test.=