From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10A1D3858C2F; Wed, 26 Jul 2023 21:22:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10A1D3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690406541; bh=CplsUWVEktGeGpw9lvwW0xU7DpFJgHMjM2R7Fa/MYsY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=x7t7azNio/iNjHAZgwKKbGPedB8phKYkVDak7Mbt8SpqZF8GVtzTLO0Vum5Okxtum aFsw2WjQ2uE70WJmeD/qTe1V0LVTxTbEEB80kn2vGd31Ro7A+vtwzG30iOYJFebUcZ Kqm1N5uww/Cgl+hCCbxT85uZkk8TkvQc+iWnldn0= 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: Wed, 26 Jul 2023 21:22:19 +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 #10 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:b3adcc60dcf3314f47f5409aecef40607f82b80b commit r14-2809-gb3adcc60dcf3314f47f5409aecef40607f82b80b 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.=