diff options
Diffstat (limited to 'gcc/cp/search.c')
-rw-r--r-- | gcc/cp/search.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 6b13469..95ede8b 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -649,8 +649,8 @@ lookup_field_1 (type, name) ; else if (DECL_NAME (field) == name) { - if ((TREE_CODE(field) == VAR_DECL || TREE_CODE(field) == CONST_DECL) - && DECL_ASSEMBLER_NAME (field) != NULL) + if (TREE_CODE(field) == VAR_DECL + && (TREE_STATIC (field) || DECL_EXTERNAL (field))) GNU_xref_ref(current_function_decl, IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (field))); return field; |