From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCFDD3858032; Mon, 5 Feb 2024 18:20:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCFDD3858032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1707157210; bh=0svrRE28yXTwNVpSLWmHl8Hsn+lVO8toH/4OnLcVs5I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=a1aOHatSgrYV7srZdPkhvq0ZC9xzY/02M229ilxoAiYVfN1XM1UG/0SOVkrDTNa0R 9c9IlQ1AJgZ5JWH6v1GDy+E8R5z2I2sFU59MUVj4NZ+oZOIvi1SJY/gmbpnLyKsjTs ok79jvbDq+d2yVL/zTHFLww4z7UEKoOGFbFTA4TI= From: "jason at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113767] [11/12/13 Regression] Missing Destructor Call with goto and return value Date: Mon, 05 Feb 2024 18:20:10 +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: 13.2.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jason at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: DUPLICATE X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution bug_status 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=3D113767 Jason Merrill changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|ASSIGNED |RESOLVED --- Comment #2 from Jason Merrill --- The fix on the branches is just to disable NRV in the presence of backward goto, as the fix on the trunk was too involved to backport. So this testcase no longer puts ss in the return slot in 11/12/13, but inst= ead returns a copy; the extra destructor call is for the copy. It looks mismat= ched because there's no user-defined copy constructor to add another "Cons" line; adding that makes it look better. *** This bug has been marked as a duplicate of bug 92407 ***=