From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4271B393D031; Fri, 26 Feb 2021 03:58:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4271B393D031 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/98810] [9/10/11 Regression] [C++20] ICE in tsubst_copy, at cp/pt.c:16771 Date: Fri, 26 Feb 2021 03:57:59 +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: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 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: Fri, 26 Feb 2021 03:58:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98810 --- Comment #3 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:7c657339d6a4a671b4cd8bc62ba4e0df6bfc7c72 commit r11-7416-g7c657339d6a4a671b4cd8bc62ba4e0df6bfc7c72 Author: Jason Merrill Date: Thu Feb 25 16:47:53 2021 -0500 c++: Fix class NTTP constness handling [PR98810] Here, when substituting still-dependent args into an alias template, we= see a non-const type because the default argument is non-const, and is not a template parm object because it's still dependent. gcc/cp/ChangeLog: PR c++/98810 * pt.c (tsubst_copy) [VIEW_CONVERT_EXPR]: Add const to a class non-type template argument that needs it. gcc/testsuite/ChangeLog: PR c++/98810 * g++.dg/cpp2a/nontype-class-defarg1.C: New test.=