https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99201
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:a99a7b0afe9a1f6f866e25b8572856ae8c1d3f8d commit r11-7985-ga99a7b0afe9a1f6f866e25b8572856ae8c1d3f8d Author: Jason Merrill <ja...@redhat.com> Date: Sun Apr 4 01:01:56 2021 -0400 c++: constexpr if and nested generic lambda [PR99201] When building up *_EXTRA_ARGS for a constexpr if or pack expansion, we need to walk into the body of a lambda to find all the local_specializations that we need to remember, like we do in find_parameter_packs_r. gcc/cp/ChangeLog: PR c++/99201 * pt.c (class el_data): Add visited field. (extract_local_specs): Pass it to cp_walk_tree. (extract_locals_r): Walk into the body of a lambda. gcc/testsuite/ChangeLog: PR c++/99201 * g++.dg/cpp1z/constexpr-if-lambda4.C: New test.