PR c++/90732 - ICE with VLA capture and generic lambda.
authorJason Merrill <jason@redhat.com>
Tue, 21 Jan 2020 18:22:35 +0000 (13:22 -0500)
committerJason Merrill <jason@redhat.com>
Tue, 21 Jan 2020 21:42:10 +0000 (16:42 -0500)
commit276265195a4e7362b34ac512f3bc0ad5a974dcff
tree4a16800867fc56302b8bdfd868f06a70d21595d1
parenta312c80194685790aec7cf678eba83a536031cbf
PR c++/90732 - ICE with VLA capture and generic lambda.

We were failing to handle VLA capture in tsubst_lambda_expr; initially
building a DECLTYPE_TYPE for the capture and then tsubsting it doesn't give
the special VLA handling.  So with this patch we call add_capture again for
VLAs.

* pt.c (tsubst_lambda_expr): Repeat add_capture for VLAs.
gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp1y/lambda-vla1.C [new file with mode: 0644]