From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0A66B385803A; Fri, 7 Jan 2022 00:26:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0A66B385803A From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61611] Incorrect exception rethrown from a function-try-catch block when a nested try-catch executes Date: Fri, 07 Jan 2022 00:26:12 +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.8.0 X-Bugzilla-Keywords: wrong-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: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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, 07 Jan 2022 00:26:13 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D61611 --- Comment #2 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:6ad76e73375a9c00a0a5f5729ae70bce7a6db5bc commit r12-6334-g6ad76e73375a9c00a0a5f5729ae70bce7a6db5bc Author: Jason Merrill Date: Thu Jan 6 09:45:26 2022 -0500 c++: nested catch in ctor fn-try-block [PR61611] Being in_function_try_handler isn't enough to satisfy the condition of reaching the end of such a handler; in this case, we're reaching the en= d of a handler within that handler, so we don't want the special semantics. PR c++/61611 gcc/cp/ChangeLog: * except.c (in_nested_catch): New. (expand_end_catch_block): Check it. gcc/testsuite/ChangeLog: * g++.dg/eh/ctor-fntry1.C: New test.=