https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86740

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Sun Jan 27 20:31:37 2019
New Revision: 268324

URL: https://gcc.gnu.org/viewcvs?rev=268324&root=gcc&view=rev
Log:
        PR c++/86740, ICE with constexpr if and nested generic lambdas.

When we partially instantiate the constexpr if, we walk through its body to
see what it uses from the enclosing local_specializations.  That walk was
overlooking the use of 'count' in the captures of the innermost lambda,
because we weren't walking into the capture list.

        * tree.c (cp_walk_subtrees): Handle LAMBDA_EXPR.

Added:
    branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp1z/constexpr-if25.C
Modified:
    branches/gcc-8-branch/gcc/cp/ChangeLog
    branches/gcc-8-branch/gcc/cp/tree.c

Reply via email to