https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102792
Bug ID: 102792 Summary: Internal compiler error if define lambda::operator() as friend Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fchelnokov at gmail dot com Target Milestone: --- This code: ``` auto f = [](auto){}; class A{ using T = decltype(f); friend void T::operator()(auto) const; }; ``` results in ``` internal compiler error: in poplevel_class, at cp/name-lookup.c:5224 ``` Demo: https://gcc.godbolt.org/z/TYa3b5f7o