[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 #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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.