From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D349385843E; Wed, 26 Jul 2023 21:22:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D349385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690406545; bh=x9ZZn93plRrwLB8D6Y8jsn1otCrxDqRHU0Ul4W8aNfk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZwONlt0oluVkNOAx92Lr70wfjZRdgNtUhpUss8sRpFfW+/oIkvu5cWU3bz/p29EQL hq7Gzw0B2UWHH0ipsx3m1pmEx8j+nMk0WJKTMhpGgqkF9trLWNZPY92y57qRjqzuFx RhfJM+gi6yiSPa/AVoaRgAyWzW1X0woGFpYif4Po= 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:25 +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 #4 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:b8218eb2266811991b8163f36d5c1d974cb50b93 commit r14-2810-gb8218eb2266811991b8163f36d5c1d974cb50b93 Author: Patrick Palka Date: Wed Jul 26 17:21:43 2023 -0400 c++: passing partially inst ttp as ttp [PR110566] The previous fix doesn't work for partially instantiated ttps mainly because most_general_template is a no-op for them. This patch fixes this by giving such ttps a DECL_TEMPLATE_INFO (extending the r11-734-g2fb595f8348e16 fix) with which most_general_template can obtain the original, unlowered ttp. This patch additionally makes coerce_template_template_parms use the correct amount of levels from the scope of a ttp argument. PR c++/110566 PR c++/108179 gcc/cp/ChangeLog: * pt.cc (reduce_template_parm_level): Set DECL_TEMPLATE_INFO on the DECL_TEMPLATE_RESULT of the new ttp. (add_defaults_to_ttp): Make a copy of the original ttp's DECL_TEMPLATE_RESULT, and update this copy's DECL_TEMPLATE_INFO as well. (coerce_template_template_parms): Make sure 'scope_args' has the right amount of levels for the ttp argument. (most_general_template): Handle template template parameters. (rewrite_template_parm): Set DECL_TEMPLATE_RESULT on the DECL_TEMPLATE_RESULT of the new ttp. gcc/testsuite/ChangeLog: * g++.dg/cpp1z/class-deduction115.C: New test. * g++.dg/template/ttp39.C: New test.=