From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5E5AA3945C06; Thu, 8 Apr 2021 11:46:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E5AA3945C06 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/99844] [9/10/11 Regression] ICE: unexpected expression 'B' of kind template_parm_index Date: Thu, 08 Apr 2021 11:46:01 +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: 11.0 X-Bugzilla-Keywords: ice-on-invalid-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: mpolacek at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.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 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: Thu, 08 Apr 2021 11:46:01 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99844 --- Comment #3 from CVS Commits --- The master branch has been updated by Marek Polacek : https://gcc.gnu.org/g:2cd5333d16419f596d07a830bb3f1c40fa8a7b5c commit r11-8041-g2cd5333d16419f596d07a830bb3f1c40fa8a7b5c Author: Marek Polacek Date: Wed Apr 7 16:44:24 2021 -0400 c++: Fix ICE with unexpanded parameter pack [PR99844] In explicit17.C, we weren't detecting an unexpanded parameter pack in explicit(bool), so we crashed on a TEMPLATE_PARM_INDEX in constexpr. I noticed the same is true for noexcept(), but only since my patch to implement delayed parsing of noexcept. Previously, we would detect the unexpanded pack in push_template_decl but now the noexcept expression has not yet been parsed, so we need to do it a bit later. gcc/cp/ChangeLog: PR c++/99844 * decl.c (build_explicit_specifier): Call check_for_bare_parameter_packs. * except.c (build_noexcept_spec): Likewise. gcc/testsuite/ChangeLog: PR c++/99844 * g++.dg/cpp2a/explicit16.C: Use c++20. * g++.dg/cpp0x/noexcept66.C: New test. * g++.dg/cpp2a/explicit17.C: New test.=