From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4F2DA3858407; Fri, 2 Sep 2022 06:06:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4F2DA3858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662098799; bh=CRl7v3laFYcwYo/T1F373djvsKZov/SICk6ljTSl9bI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vjtfR7Sio71ZX6IGFTPRq/uSvwxsH/oMdw/CAxIGYCHDwBd6mQbg4QW/R3VOZ6Kku D7GJCpy5cxN9IyfQGQnUwLwH//m4qLHlWPS4TcL7u3AyIECNeVyncZd1UC0e0XresG Lg7KyP1ly8ozYuOG8SXT2eKghHTA4zF2F/hTqJDk= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/106627] Exception from multiversion function cannot be caught Date: Fri, 02 Sep 2022 06:06:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: EH, 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: unassigned 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106627 --- Comment #4 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:0b0a3cdbff64d97e7de3e0e2c26e965708064193 commit r13-2360-g0b0a3cdbff64d97e7de3e0e2c26e965708064193 Author: Simon Rainer Date: Wed Aug 31 23:00:08 2022 +0200 ipa: Fix throw in multi-versioned functions [PR106627] Any multi-versioned function was implicitly declared as noexcept, which leads to an abort if an exception is thrown inside the function. The reason for this is that the function declaration is replaced by a newly created dispatcher declaration, which has TREE_NOTHROW always set to 1. Instead we need to set TREE_NOTHROW to the value of the original declaration. PR ipa/106627 gcc/ChangeLog: * config/i386/i386-features.cc (ix86_get_function_versions_dispatcher): Set TREE_NOTHROW correctly for dispatcher declaration. * config/rs6000/rs6000.cc (rs6000_get_function_versions_dispatcher): Likewise. gcc/testsuite/ChangeLog: * g++.target/i386/pr106627.C: New test.=