https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123281
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- most_general_template returns NULL, because get_template_info returns TEMPLATE_INFO with TI_TEMPLATE being OVERLOAD and so 27152 /* The TI_TEMPLATE can be an IDENTIFIER_NODE for a 27153 template friend, or a FIELD_DECL for a capture pack. */ 27154 if (TREE_CODE (decl) != TEMPLATE_DECL) 27155 return NULL_TREE; returns NULL.
