PR c++/60855 - ICE with sizeof VLA capture.
authorJason Merrill <jason@redhat.com>
Tue, 21 Jan 2020 19:21:49 +0000 (14:21 -0500)
committerJason Merrill <jason@redhat.com>
Tue, 21 Jan 2020 21:42:10 +0000 (16:42 -0500)
commitad09440a09597c34e0b93498aad9d6ef0b8ca9ae
treef289edc6a5ba5ab65034e39dafef9bab5f504fb8
parent276265195a4e7362b34ac512f3bc0ad5a974dcff
PR c++/60855 - ICE with sizeof VLA capture.

For normal captures we usually look through them within unevaluated context,
but that doesn't work here; trying to take the sizeof of the array in the
enclosing scope tries and fails to evaluate a SAVE_EXPR from the enclosing
scope.

* lambda.c (is_lambda_ignored_entity): Don't look past VLA capture.
gcc/cp/ChangeLog
gcc/cp/lambda.c
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-vla4.C [new file with mode: 0644]