https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107550
Bug ID: 107550 Summary: incorrect templated lambda mangling Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: nathan at gcc dot gnu.org Target Milestone: --- I got something wrong in template lambda manglings, discovered when working on the demangler (uncommitted). Confirmed with clang. We get the wrong mangling, somehow losing the template-head of the lambda. template<typename T> class X; inline void f () { auto l3 = []<typename T>(X<T> *, X<int> *) {}; l3 ((X<char> *)nullptr, nullptr); // _ZZ1fvENKUlTyP1XIT_EPS_IiEE _clIcEEDaS2_S4_ Correct // _ZZ1fvENKUl P1XIT_EPS_IiEE0_clIcEEDaS2_S4_ Wrong } void a () { f (); }