(dbxout_symbol): Properly handle decl whose DECL_NAME points to a
authorRichard Kenner <kenner@gcc.gnu.org>
Sat, 11 Mar 1995 11:42:39 +0000 (06:42 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sat, 11 Mar 1995 11:42:39 +0000 (06:42 -0500)
TYPE_DECL with a zero TYPE_NAME.

From-SVN: r9171

gcc/dbxout.c

index 7363b6fcce858a4c188da85d5e7e3f824ea67ec9..2aea943fb0768b4229286eea172dcf995a5c4ac2 100644 (file)
@@ -1676,7 +1676,10 @@ dbxout_symbol (decl, local)
        /* Don't output a tag if this is an incomplete type (TYPE_SIZE is
           zero).  This prevents the sun4 Sun OS 4.x dbx from crashing.  */ 
 
-       if (tag_needed && TYPE_NAME (type) != 0 && TYPE_SIZE (type) != 0
+       if (tag_needed && TYPE_NAME (type) != 0
+           && (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE
+               || (DECL_NAME (TYPE_NAME (type)) != 0))
+           && TYPE_SIZE (type) != 0
            && !TREE_ASM_WRITTEN (TYPE_NAME (type)))
          {
            /* For a TYPE_DECL with no name, but the type has a name,