From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4CBCB3858280; Mon, 7 Aug 2023 23:27:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4CBCB3858280 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1691450825; bh=M1kI7Gqg/W3hjciZJ3j1btE9/DTGiYn8NczeML0UTTQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Co2iX+OHsMdvhtKj6hW4109mog7dV4qXfu31etIg4guG6m7Rz9zPmPgmQaHC32GWJ azSEcWGelk0rBfB4lfOwrj4BGlrplnqGgXiSX/9Se6KiqP8jrWrtVZ+/dlFrIsj9+j stGruWU3KHqy6Ss6VNXniRvzP/nyiF2uF/rpklug= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/108179] [11/12 regression] ICE related to template template parameters in tsubst, at cp/pt.cc:15782 Date: Mon, 07 Aug 2023 23:27:03 +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.2.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: 11.5 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=3D108179 --- Comment #12 from CVS Commits --- The releases/gcc-13 branch has been updated by Patrick Palka : https://gcc.gnu.org/g:2c6e76ff039782401f705cacda60c11f8dfac3b1 commit r13-7692-g2c6e76ff039782401f705cacda60c11f8dfac3b1 Author: Patrick Palka Date: Wed Jul 26 17:21:26 2023 -0400 c++: passing partially inst tmpl as ttp [PR110566] Since the template arguments 'pargs' we pass to coerce_template_parms f= rom coerce_template_template_parms are always a full set, we need to make s= ure we always pass the parameters of the most general template because if t= he template is partially instantiated then the levels won't match up. In = the testcase below during said call to coerce_template_parms the parameters= are {X, Y}, both level 1 rather than 2, and the arguments are {{int}, {N, M= }}, which results in a crash during auto deduction for parameters' types. PR c++/110566 PR c++/108179 gcc/cp/ChangeLog: * pt.cc (coerce_template_template_parms): Simplify by using DECL_INNERMOST_TEMPLATE_PARMS and removing redundant asserts. Always pass the parameters of the most general template to coerce_template_parms. gcc/testsuite/ChangeLog: * g++.dg/template/ttp38.C: New test. (cherry picked from commit b3adcc60dcf3314f47f5409aecef40607f82b80b)=