PR c++/93286 - ICE with __is_constructible and variadic template.
authorJason Merrill <jason@redhat.com>
Thu, 16 Jan 2020 21:55:39 +0000 (16:55 -0500)
committerJason Merrill <jason@redhat.com>
Fri, 17 Jan 2020 03:24:28 +0000 (22:24 -0500)
commit5194b51ed9714808d88827531e91474895b6c706
tree1676c1dcbae6a4b3468682a5b9596653f6d88db9
parent1113de9499dadd2402fa97d0009d5d0b5af0987b
PR c++/93286 - ICE with __is_constructible and variadic template.

Here we had been recursing in tsubst_copy_and_build if type2 was a TREE_LIST
because that function knew how to deal with pack expansions, and tsubst
didn't.  But tsubst_copy_and_build expects to be dealing with expressions,
so we crash when trying to convert_from_reference a type.

* pt.c (tsubst) [TREE_LIST]: Handle pack expansion.
(tsubst_copy_and_build) [TRAIT_EXPR]: Always use tsubst for type2.
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/ext/is_constructible4.C [new file with mode: 0644]