https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121777
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |14.3.0 Ever confirmed|0 |1 Last reconfirmed| |2025-09-03 Status|UNCONFIRMED |NEW Summary|ICE with returning a |[15/16 Regression] ICE with |generic lambda to a |returning a generic lambda |template function |to a template function Known to fail| |15.1.0 Keywords| |needs-bisection --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Reduced testcase: ``` template <class T> auto f() { return [](auto&& x) -> T { return (T) x; }; } void test() { f<const int&>(); } ```