From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0574E3861841; Wed, 20 Dec 2023 17:31:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0574E3861841 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703093503; bh=ddrECS6aKndMP+4r6yaztHMF5QogvXbeOaL7PeNbbog=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NYewldwzy6F3Iw7zRIWKevQqM3j03ujjKOD+3bVamVk2gM7lUj4dlOqnoIIQPgtkE sOZoqkKMMRfwzBEd+4nvSPNgK8Gs0qLITmo16k3V5moxTM5QStv3QodGT9gzyoluGO lPX1i+4GiyLFdxyMnpnnhs+Kvla5Xto3JbZvc2u8= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/33799] Return value's destructor not executed when a local variable's destructor throws Date: Wed, 20 Dec 2023 17:31:37 +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: 4.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D33799 --- Comment #28 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:02c0b49798228d777610f898cd9d63ebec43656d commit r14-6754-g02c0b49798228d777610f898cd9d63ebec43656d Author: Jason Merrill Date: Wed Dec 20 11:06:27 2023 -0500 c++: throwing dtor and empty try [PR113088] maybe_splice_retval_cleanup assumed that the function body can't be emp= ty if there's a throwing cleanup, but when I added cleanups to try blocks in r12-6333-gb10e031458d541 I didn't adjust that assumption. PR c++/113088 PR c++/33799 gcc/cp/ChangeLog: * except.cc (maybe_splice_retval_cleanup): Handle an empty bloc= k. gcc/testsuite/ChangeLog: * g++.dg/eh/return2.C: New test.=