]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: class nttp ICE
authorJason Merrill <jason@redhat.com>
Wed, 7 Feb 2024 20:03:01 +0000 (15:03 -0500)
committerJason Merrill <jason@redhat.com>
Thu, 8 Feb 2024 00:21:57 +0000 (19:21 -0500)
commit4797f0100b95802b2c043d64364ce9b77469a182
tree383374e9694ea1683aa834747cf7264b788288e5
parent0535c203c5b5ce9c7ae29fc8ba6288986fc3b34e
c++: class nttp ICE

The new testcase from P2308 crashed trying to expand 'this' without an
object to refer to, because we stripped the TARGET_EXPR in
create_template_parm_object.  So let's leave it on for giving an error.

gcc/cp/ChangeLog:

* pt.cc (create_template_parm_object): Pass TARGET_EXPR to
cxx_constant_value.

gcc/testsuite/ChangeLog:

* g++.dg/cpp2a/nontype-class64.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/cpp2a/nontype-class64.C [new file with mode: 0644]