aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/xcoffout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/xcoffout.c b/gcc/xcoffout.c
index a7875eb..35b676c 100644
--- a/gcc/xcoffout.c
+++ b/gcc/xcoffout.c
@@ -134,7 +134,8 @@ assign_type_number (syms, name, number)
tree decl;
for (decl = syms; decl; decl = TREE_CHAIN (decl))
- if (!strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)), name))
+ if (DECL_NAME (decl)
+ && strcmp (IDENTIFIER_POINTER (DECL_NAME (decl)), name) == 0)
{
TREE_ASM_WRITTEN (decl) = 1;
TYPE_SYMTAB_ADDRESS (TREE_TYPE (decl)) = number;