https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90505
--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Seems to be caused by this change:
@@ -16327,15 +16388,6 @@ cp_parser_template_name (cp_parser* parser,
}
}
- /* If DECL is dependent, and refers to a function, then just return
- its name; we will look it up again during template instantiation. */
- if (DECL_FUNCTION_TEMPLATE_P (decl) || !DECL_P (decl))
- {
- tree scope = ovl_scope (decl);
- if (TYPE_P (scope) && dependent_type_p (scope))
- return identifier;
- }
-
return decl;
}