https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61558

--- Comment #17 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK I am testing the following patch. It just makes symtab code ready for
DECL_ASSEMBLER_NAME returning NULL
Index: symtab.c
===================================================================
--- symtab.c    (revision 218640)
+++ symtab.c    (working copy)
@@ -168,6 +168,11 @@ symbol_table::insert_to_assembler_name_h

       tree name = DECL_ASSEMBLER_NAME (node->decl);

+      /* C++ FE can produce decls without associated assembler name and insert
+        them to symtab to hold section or TLS information.  */
+      if (!name)
+       return;
+
       hashval_t hash = decl_assembler_name_hash (name);
       aslot = assembler_name_hash->find_slot_with_hash (name, hash, INSERT);
       gcc_assert (*aslot != node);
@@ -209,6 +214,10 @@ symbol_table::unlink_from_assembler_name
        {
          tree name = DECL_ASSEMBLER_NAME (node->decl);
           symtab_node **slot;
+
+         if (!name)
+           return;
+
          hashval_t hash = decl_assembler_name_hash (name);
          slot = assembler_name_hash->find_slot_with_hash (name, hash,
                                                           NO_INSERT);

Reply via email to