From f09859008013c74a6b5d2530232216a3965278d3 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 9 Sep 2003 15:37:17 +0200 Subject: [PATCH] * varasm.c (notice_global_symbol): Properly deal with weak symbols. From-SVN: r71236 --- gcc/ChangeLog | 4 ++++ gcc/varasm.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36a1b608ab5..d103a85e21b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Tue Sep 9 15:36:28 CEST 2003 Jan Hubicka + + * varasm.c (notice_global_symbol): Properly deal with weak symbols. + 2003-09-08 Kelley Cook * Makefile.in: Revert yesterday's change. diff --git a/gcc/varasm.c b/gcc/varasm.c index 84fbf259baf..d7c60682cd1 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -1048,11 +1048,11 @@ void notice_global_symbol (tree decl) { if ((!first_global_object_name || !weak_global_object_name) - && TREE_PUBLIC (decl) + && TREE_PUBLIC (decl) && !DECL_COMMON (decl) && (TREE_CODE (decl) == FUNCTION_DECL - || ! (DECL_COMMON (decl) - && (DECL_INITIAL (decl) == 0 - || DECL_INITIAL (decl) == error_mark_node)))) + || (TREE_CODE (decl) == VAR_DECL + && (DECL_INITIAL (decl) != 0 + && DECL_INITIAL (decl) != error_mark_node)))) { const char *p; char *name; -- 2.30.2