From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E7C713851C1D; Fri, 8 May 2020 19:47:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7C713851C1D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588967237; bh=zzp/F9d27JOUg2ZYkTvreYfaCgRmKCMeIOxycfowybA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jVh6zDdONhN2M8hPnryZ6JOcBp2msW+WOTBOtJsrOuu7zNcThpEPMoZnc3j+oOjU4 esqzQjyAACQmJNSxB97zR1oYBXxsT7xcxuknr73fZ08Q5kfwVMN9bFIH08lGaG15xW /vytLN+OuRsA2AwZD72ZgtQ5cyXN0u5+qNdvvz/Q= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/95003] coroutines: Wrong code for some reference capture cases. Date: Fri, 08 May 2020 19:47:17 +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.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: Fri, 08 May 2020 19:47:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95003 --- Comment #1 from CVS Commits --- The master branch has been updated by Iain D Sandoe : https://gcc.gnu.org/g:234681eadf2c51d7b78270188d64601b7267330d commit r11-208-g234681eadf2c51d7b78270188d64601b7267330d Author: Iain Sandoe Date: Sun May 3 14:20:13 2020 +0100 coroutines: Update TREE_SIDE_EFFECTS on inserted bind exprs. There are several places where we insert bind expressions while making the coroutine AST transforms. These should be marked as having side-effects where relevant, which had been omitted. This leads to at least one failure in the cppcoros test suite, where a loop body is dropped in gimplification because it is not marked. gcc/cp/ChangeLog: 2020-05-08 Iain Sandoe PR c++/95003 * coroutines.cc (build_actor_fn): Ensure that bind scopes are marked as having side-effects where necessary. (replace_statement_captures): Likewise. (morph_fn_to_coro): Likewise. gcc/testsuite/ChangeLog: 2020-05-08 Iain Sandoe PR c++/95003 * g++.dg/coroutines/torture/pr95003.C: New test.=