https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92232
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Shorter testcase: int myFunc(int); template<typename T, auto(functor)(T)> struct f; f<int, myFunc> *t; template<typename T, auto(functor)(T)> int f1(); int t1 = f1<int, myFunc>();