https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77549
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 39609 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39609&action=edit gcc7-pr77549.patch Untested fix. In the names chain, there can be not just decls and error_mark_nodes, but also TREE_LIST (either for decls appearing from using, or for OVERLOADs), and for such wrapped OVERLOADs we need to look through them too to be able to look at DECL_NAME.