https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114488
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- On the gcc-9 branch the first bad commit is r9-8623-g0296697cf9893d commit 0296697cf9893dc9509cdcd8e3fd4ba9fe422527 Author: Jason Merrill Date: Mon May 25 18:38:09 2020 -0400 c++: constexpr and lambda capture [PR90212] This is the same issue as PR86429, just in potential_constant_expression_1 rather than cxx_eval_constant_expression. As in that case, when we're trying to evaluate a constant expression within a lambda, we don't have a constant closure object to refer to, but we can try to refer directly to the captured variable. PR c++/90212 * constexpr.c (potential_constant_expression_1): In a lambda function, consider a captured variable directly.