https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94205
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <[email protected]>: https://gcc.gnu.org/g:76f09260b7eccd6c3cfa3dcf3c22897fe12a8065 commit r10-7490-g76f09260b7eccd6c3cfa3dcf3c22897fe12a8065 Author: Jason Merrill <[email protected]> Date: Tue Mar 31 17:34:47 2020 -0400 c++: Fix DMI with lambda 'this' capture [PR94205] We represent 'this' in a default member initializer with a PLACEHOLDER_EXPR. Normally in constexpr evaluation when we encounter one it refers to ctx->ctor, but when we're creating a temporary of class type, that replaces ctx->ctor, so a PLACEHOLDER_EXPR that refers to the type of the member being initialized needs to be replaced before that happens. gcc/cp/ChangeLog 2020-03-31 Jason Merrill <[email protected]> PR c++/94205 * constexpr.c (cxx_eval_constant_expression) [TARGET_EXPR]: Call replace_placeholders. * typeck2.c (store_init_value): Fix arguments to fold_non_dependent_expr.
