summaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-28 20:08:29 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-28 20:08:29 +0000
commit4d3af8422358dd1aae160be050b3d81663999ca9 (patch)
tree91402aa0ab127e6ee19b119df061b14a8856756a /gcc/varasm.c
parent1da8586af0e0891fc526e6b33ff073242838c551 (diff)
downloadgcc-4d3af8422358dd1aae160be050b3d81663999ca9.tar.gz
* varasm.c (default_binds_local_p): Check TREE_PUBLIC before
DECL_EXTERNAL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53963 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 89eb47e92dc..73ba7cdd11c 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -5597,7 +5597,10 @@ default_binds_local_p (exp)
/* A non-decl is an entry in the constant pool. */
if (!DECL_P (exp))
local_p = true;
- /* A variable is considered "local" if it is defined by this module. */
+ /* Static variables are always local. */
+ else if (! TREE_PUBLIC (exp))
+ local_p = true;
+ /* A variable is local if the user tells us so. */
else if (MODULE_LOCAL_P (exp))
local_p = true;
/* Otherwise, variables defined outside this object may not be local. */
@@ -5606,9 +5609,6 @@ default_binds_local_p (exp)
/* Linkonce and weak data are never local. */
else if (DECL_ONE_ONLY (exp) || DECL_WEAK (exp))
local_p = false;
- /* Static variables are always local. */
- else if (! TREE_PUBLIC (exp))
- local_p = true;
/* If PIC, then assume that any global name can be overridden by
symbols resolved from other modules. */
else if (flag_pic)