Hi, cgraph dumpnow segfaults as we have symbols without DECL_NAME set. This patch makes us to print node by asm name or as <unamed> if everything fails.
Honza * symtab.c (symtab_node::asm_name): Do not call printable name directly. (symtab_node::name): Report name as unnamed if DECL_NAME is not set. Index: symtab.c =================================================================== --- symtab.c (revision 232466) +++ symtab.c (working copy) @@ -504,7 +513,7 @@ const char * symtab_node::asm_name () const { if (!DECL_ASSEMBLER_NAME_SET_P (decl)) - return lang_hooks.decl_printable_name (decl, 2); + return name (); return IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); } @@ -513,6 +522,13 @@ symtab_node::asm_name () const const char * symtab_node::name () const { + if (!DECL_NAME (decl)) + { + if (DECL_ASSEMBLER_NAME_SET_P (decl)) + return asm_name (); + else + return "<unnamed>"; + } return lang_hooks.decl_printable_name (decl, 2); }