https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82936
--- Comment #2 from lizhenhuan1019 <lizhenhuan1019 at qq dot com> --- Simplified the test case more: int fun(int i) { return 0; } template <typename F> struct outer; template <typename R, typename ...Args> struct outer<R(Args...)> { template <R(& f)(Args...)> struct callable { }; }; outer<int(int)>::callable<fun> f;//this line triggered the bug.