From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4DADD3857739; Wed, 24 Jan 2024 19:40:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4DADD3857739 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706125248; bh=qAT0LjHB2baGmsnZN1s5KQWrJAikvBSIgKdZSAJX7zc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Ms2UaVZtLlNGsxiWWGTE2MVg8BvB37V31m+rmI+ucVMFI1m/1zRNktNco5hMnfRnM T5o+2J2ozRO1UW2gtXBOBXU9DXYMUqMmbgTANUF6FVlouCkLnDrOI9OVAvb1uaeeG7 ata4sDNeI7s+Te1+SfCeF2QVNre8URh0OIUSeHZs= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113088] [12/13 Regression] Segmentation fault with empty try/catch following try/catch with returns + noexcept destructor Date: Wed, 24 Jan 2024 19:40:46 +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: 12.3.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.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=3D113088 --- Comment #4 from GCC Commits --- The releases/gcc-12 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:b0605cd4a12e9162cc56abc69ca1048947c72689 commit r12-10110-gb0605cd4a12e9162cc56abc69ca1048947c72689 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. (cherry picked from commit 02c0b49798228d777610f898cd9d63ebec43656d)=