[Bug c++/98810] [9/10 Regression] [C++20] ICE in tsubst_copy, at cp/pt.c:16771
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 4 04:49:19 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98810
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:bf49d83570ddb4df7893c3d605f7fc89db13792d
commit r10-9412-gbf49d83570ddb4df7893c3d605f7fc89db13792d
Author: Jason Merrill <jason@redhat.com>
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.
More information about the Gcc-bugs
mailing list