From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5AA9E3984018; Thu, 22 Oct 2020 11:34:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5AA9E3984018 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb Date: Thu, 22 Oct 2020 11:34:22 +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-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: P3 X-Bugzilla-Assigned-To: ppalka at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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, 22 Oct 2020 11:34:22 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97511 --- Comment #2 from CVS Commits --- The master branch has been updated by Patrick Palka : https://gcc.gnu.org/g:b083a14dfe1f53446722f488885078e419238d24 commit r11-4229-gb083a14dfe1f53446722f488885078e419238d24 Author: Patrick Palka Date: Thu Oct 22 07:27:55 2020 -0400 c++: Check DECL_TEMPLATE_PARM_P in duplicate_decls [PR97511] This makes duplicate_decls differentiate a TYPE_DECL for an alias template from a TYPE_DECL for one of its template parameters. The recently added assert in template_parm_to_arg revealed this latent issue because merging of the two TYPE_DECLs cleared the DECL_TEMPLATE_PARM_P flag. With this patch, we now also correctly diagnose the name shadowing in the below testcase (as required by [temp.local]/6). gcc/cp/ChangeLog: PR c++/97511 * decl.c (duplicate_decls): Return NULL_TREE if DECL_TEMPLATE_PARM_P differ. gcc/testsuite/ChangeLog: PR c++/97511 * g++.dg/template/shadow3.C: New test.=