PR c++/89761 - ICE with sizeof... in pack expansion.
authorJason Merrill <jason@redhat.com>
Mon, 18 Mar 2019 19:35:12 +0000 (15:35 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 18 Mar 2019 19:35:12 +0000 (15:35 -0400)
commitd849cfaeeaf15a30170b0fb10b4f62075a1ee58b
treec32251d20bb1609b1357de819c8f7add7824427a
parent6e3587dbbcefd4d4bdafaea0aa1cb8eb9495bd9c
PR c++/89761 - ICE with sizeof... in pack expansion.

In this testcase we get confused when looking at the sizeof... because the
argument pack for 'args' has been wrapped in an ARGUMENT_PACK_SELECT as part
of expanding the fold-expression.  We handle this situation a bit lower down
in tsubst_pack_expansion, but that doesn't help the call to
argument_pack_element_is_expansion_p, which happens earlier.

* pt.c (argument_pack_element_is_expansion_p): Handle
ARGUMENT_PACK_SELECT.

From-SVN: r269776
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1z/fold10.C [new file with mode: 0644]