[Bug c++/126754] [16/17 Regression] ICE in tsubst_expr, at cp/pt.cc:23354 since r16-5970

"jason 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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Ah, the issue is that we don't want TARGET_EXPR in templates, but we also don't
want 'a' to stick around in the lambda, so we replace it with its constant
value...which we represent as a TARGET_EXPR.

Perhaps the simplest solution is to allow TREE_CONSTANT TARGET_EXPR.
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.