c++: unifying integer parm with type-dep arg [PR113644]
commitaf37bef86199e50368cbfbc97befe0622a07f12f
authorPatrick Palka <ppalka@redhat.com>
Tue, 30 Jan 2024 15:13:41 +0000 (30 10:13 -0500)
committerPatrick Palka <ppalka@redhat.com>
Tue, 30 Jan 2024 15:13:41 +0000 (30 10:13 -0500)
tree49da7d3efffe280f4a66990c607e706393a2d527
parent5525dd754b84cef3afe43dc7fdf27664873f137b
c++: unifying integer parm with type-dep arg [PR113644]

Here when trying to unify P=42 A=T::value we ICE due to the latter's
empty type, which same_type_p dislikes.

PR c++/113644

gcc/cp/ChangeLog:

* pt.cc (unify) <case INTEGER_CST>: Handle NULL_TREE type.

gcc/testsuite/ChangeLog:

* g++.dg/template/nontype30.C: New test.
gcc/cp/pt.cc
gcc/testsuite/g++.dg/template/nontype30.C [new file with mode: 0644]