[Bug c++/117034] ICE on abbreviated function template with type constraint containing a lambda argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117034 --- Comment #8 from Egas Ribeiro --- > > After > > r16-5115 changed convert_template_argument to call > r16-5115 seems unrelated? Sorry about this, I looked over the initial patch I send and I made an error with the commit reference. I intended to mention r16-4115, but the bug was reported in October 2024 and r16-4115 is from October 2025, so it couldn't have introduced the issue anyway. Initially i was bisecting to find the cause for the bug and ended up going with something else and forgot to edit the commit message to not mention the commit I was following initially. The bug likely exposed a pre-existing issue rather than being caused by a specific recent change. Should the commit message be updated?
[Bug c++/117034] ICE on abbreviated function template with type constraint containing a lambda argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117034 Patrick Palka changed: What|Removed |Added CC||ppalka at gcc dot gnu.org --- Comment #7 from Patrick Palka --- (In reply to GCC Commits from comment #6) > The trunk branch has been updated by Jason Merrill : > > https://gcc.gnu.org/g:5f39aa74f2217e04d2868f2110523b2a0ed41165 > > commit r16-6277-g5f39aa74f2217e04d2868f2110523b2a0ed41165 > Author: Jason Merrill > Date: Fri Dec 19 15:20:13 2025 +0700 > > c++: lambda template arg in abbreviated template [PR117034] > > A lambda used as a non-type template argument to a type-constraint in the > first parameter of an abbreviated function template was wrapped in a > TARGET_EXPR because we hadn't opened the implicit template scope yet. > After > r16-5115 changed convert_template_argument to call r16-5115 seems unrelated?
[Bug c++/117034] ICE on abbreviated function template with type constraint containing a lambda argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117034 --- Comment #6 from GCC Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:5f39aa74f2217e04d2868f2110523b2a0ed41165 commit r16-6277-g5f39aa74f2217e04d2868f2110523b2a0ed41165 Author: Jason Merrill Date: Fri Dec 19 15:20:13 2025 +0700 c++: lambda template arg in abbreviated template [PR117034] A lambda used as a non-type template argument to a type-constraint in the first parameter of an abbreviated function template was wrapped in a TARGET_EXPR because we hadn't opened the implicit template scope yet. After r16-5115 changed convert_template_argument to call instantiate_non_dependent_expr_internal on non-dependent expressions, these TARGET_EXPRs began hitting the default case in tsubst_expr, causing an ICE. So let's enter implicit template scope as soon as we see the concept-name; at that point we know we're declaring an abbreviated template. PR c++/117034 gcc/cp/ChangeLog: * parser.cc (maybe_start_implicit_template): Split out from... (synthesize_implicit_template_parm): ...here. (cp_parser_template_id): Call it. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/lambda-template-pr117034.C: New test. Co-authored-by: Egas Ribeiro
[Bug c++/117034] ICE on abbreviated function template with type constraint containing a lambda argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117034 --- Comment #5 from Egas Ribeiro --- Patch submitted: https://gcc.gnu.org/pipermail/gcc-patches/2025-November/702303.html
[Bug c++/117034] ICE on abbreviated function template with type constraint containing a lambda argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117034 Nathaniel Shead changed: What|Removed |Added CC||nshead at gcc dot gnu.org Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |egas.g.ribeiro at tecnico dot ulis ||boa.pt
[Bug c++/117034] ICE on abbreviated function template with type constraint containing a lambda argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117034 --- Comment #4 from eczbek.void at gmail dot com --- Whoops.
[Bug c++/117034] ICE on abbreviated function template with type constraint containing a lambda argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117034 --- Comment #3 from Andrew Pinski --- (In reply to eczbek.void from comment #2) > Is this error related? Yes but you filed PR 116952 which is that issue.
[Bug c++/117034] ICE on abbreviated function template with type constraint containing a lambda argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117034
--- Comment #2 from eczbek.void at gmail dot com ---
Is this error related?
```
template
concept A = true;
template T>
void foo(T) {}
```
Compiler Explorer link: https://godbolt.org/z/dfKaW8dxa
[Bug c++/117034] ICE on abbreviated function template with type constraint containing a lambda argument
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117034 Andrew Pinski changed: What|Removed |Added Keywords||ice-on-valid-code Last reconfirmed||2024-10-08 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #1 from Andrew Pinski --- Confirmed.
