From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E18013857B98; Wed, 26 Jul 2023 21:22:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E18013857B98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690406540; bh=VWi4mbHH4GCGCK6JrQIwy7dWO1J9fyNRItOs89zBUKA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yMNUKb+KtlI1RzE4bb66DfUuovJxFei/JSUzawAPX2i4hqpLU4+sQXddp2vgijfv7 JsiM6wDpSJFwIrasD3ztYqKZOllwEjxTZ3uy89coTtwMm11TbEneEtyitG8y3RPJLT fFZAqyyno1n+WevkoNq40OjlYTWIsq8SQkzMhX3M= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110566] [13/14 Regression] ICE when instantiating function template with template template parameter with 2 or more auto parameters with a dependent member template, ICE in tsubst, at cp/pt.cc:16135 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: 13.1.0 X-Bugzilla-Keywords: ice-on-valid-code, patch X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.2 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=3D110566 --- Comment #3 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.=