aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-03-11 06:42:39 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1995-03-11 06:42:39 -0500
commitbf6ed0403197c55ff8176894d0a215b32ef15bc5 (patch)
tree19dd03d9b3e5b0819f33a15668347accd81ba3ee /gcc
parent9f9fba3664481a68c6b583a572f4fbbbdb33eca8 (diff)
downloadgcc-bf6ed0403197c55ff8176894d0a215b32ef15bc5.zip
gcc-bf6ed0403197c55ff8176894d0a215b32ef15bc5.tar.gz
gcc-bf6ed0403197c55ff8176894d0a215b32ef15bc5.tar.bz2
(dbxout_symbol): Properly handle decl whose DECL_NAME points to a
TYPE_DECL with a zero TYPE_NAME. From-SVN: r9171
Diffstat (limited to 'gcc')
-rw-r--r--gcc/dbxout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 7363b6f..2aea943 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -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,