[Bug c++/126754] [16/17 Regression] ICE in tsubst_expr, at cp/pt.cc:23354 since r16-5970
"cvs-commit at gcc dot gnu.org via Gcc-bugs" <[email protected]>
| Newsgroups | gmane.comp.gcc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126754 --- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <[email protected]>: https://gcc.gnu.org/g:654eb1f70643a2c57b3c6a31c250c1213a23aa4f commit r17-3291-g654eb1f70643a2c57b3c6a31c250c1213a23aa4f Author: Jason Merrill <[email protected]> Date: Tue Aug 11 16:12:10 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. Let's not do the latter in a template. PR c++/126754 gcc/cp/ChangeLog: * constexpr.cc (cxx_eval_outermost_constant_expr): Don't wrap in TARGET_EXPR when processing_template_decl. gcc/testsuite/ChangeLog: * g++.dg/cpp1y/constexpr-lambda2.C: New test.