From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A374B3858D38; Mon, 15 Jan 2024 23:08:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A374B3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705360131; bh=RALuCQK+VhmpSCorcD0IDHOnMoAah8kLrKjMYKewZuM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PoE0jnT+HPrD0xUx2Eo5fn4ZJl+zi+lUsQ+A1YnmGteIuxRUTu1gFdc/evH4jsKLg lKEOirI/9KISU5O6JueklDZAMiaMnH48qfj63rfGN+2SKKHfNd97PZvheqoUt7MGRG j7LgsU1bk69IRuHrajC8PMVBCLxEKpxvqzzARxbQ= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109899] [12/13 Regression] ICE in check_noexcept_r, at cp/except.cc:1065 Date: Mon, 15 Jan 2024 23:08:51 +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.1.1 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: ppalka 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=3D109899 --- Comment #12 from GCC Commits --- The releases/gcc-12 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:6477b3b9c3e5be5dfe549dcb7b3cef2b49e3690c commit r12-10098-g6477b3b9c3e5be5dfe549dcb7b3cef2b49e3690c Author: Patrick Palka Date: Mon Jan 15 16:49:19 2024 -0500 c++: non-dep array list-init w/ non-triv dtor [PR109899] The get_target_expr call added in r12-7069-g119cea98f66476 causes us for the below testcase to call build_vec_delete in a template context, which builds a templated destructor call and checks expr_noexcept_p for it, which ICEs because the call has templated form. Much of the work of build_vec_delete however is code generation and thus will just get discarded in a template context, and that includes the code guarded by expr_noexcept_p. So this patch narrowly fixes this ICE by eliding the expr_noexcept_p call when in a template context. PR c++/109899 gcc/cp/ChangeLog: * init.cc (build_vec_delete_1): Assume expr_noexcept_p returns false in a template context. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/initlist-array21.C: New test. Reviewed-by: Jason Merrill (cherry picked from commit d33c3b5ac9b9b3e314ae9118d483ade7e91a80a5)=