PR c++/84036 - ICE with variadic capture.
authorJason Merrill <jason@redhat.com>
Mon, 12 Feb 2018 01:21:39 +0000 (20:21 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 12 Feb 2018 01:21:39 +0000 (20:21 -0500)
commitdc58fa9f3142097bbcf2d60212041d08ab16cd8e
tree6015b7020be9ee3d06dffafcd87f625e23b96749
parentf1ea257f3cda1f04a64a4046f77013727693eb70
PR c++/84036 - ICE with variadic capture.

Handle variadic capture proxies more like non-variadic.
* lambda.c (build_capture_proxy): Remove workaround.
* pt.c (find_parameter_packs_r): The proxy is a pack.
(instantiate_class_template_1): Remove dead lambda code.
(extract_fnparm_pack): Don't make_pack_expansion.
(extract_locals_r): Don't strip a pack expansion.
(tsubst_pack_expansion): Handle proxy packs.  Use
PACK_EXPANSION_EXTRA_ARGS less.
(tsubst_decl) [FIELD_DECL]: Don't register_specialization.
(tsubst_copy) [FIELD_DECL]: Don't retrieve*_specialization.
[VAR_DECL]: Handle ARGUMENT_PACK_SELECT.
(tsubst_expr) [DECL_EXPR]: Handle proxy packs.
(tsubst_copy_and_build) [VAR_DECL]: Handle proxy packs normally.

From-SVN: r257575
gcc/cp/ChangeLog
gcc/cp/lambda.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic11.C [new file with mode: 0644]