https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126754
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Jason Merrill <[email protected]>: https://gcc.gnu.org/g:1ef50505862d6702e95e76b3ce2c5ed3a93610cb commit r16-9536-g1ef50505862d6702e95e76b3ce2c5ed3a93610cb Author: Jason Merrill <[email protected]> Date: Fri Aug 14 09:37:39 2026 -0400 c++: constexpr class access in generic lambda [PR126754] We don't want to see TARGET_EXPR in template trees because it's an implementation detail, not a representation of the source. But constant evaluation normally represents a constant class value with a TARGET_EXPR. For GCC 16 let's duplicate the default case handling. PR c++/126754 gcc/cp/ChangeLog: * pt.cc (tsubst_expr) <case TARGET_EXPR>: Only unreachable when checking. gcc/testsuite/ChangeLog: * g++.dg/cpp1y/constexpr-lambda2.C: New test.
