aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2013-05-16 10:29:42 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2013-05-16 10:29:42 +0000
commite3753785835fdb4c96f901c7d158a38b1c5c2f78 (patch)
tree99797a98eef64aa5f2258997fd4fc31a3d8d6c1f /gcc/varasm.c
parent43bb4dd14d015211a19ccd8c1802cc7e1361d8b7 (diff)
downloadgcc-e3753785835fdb4c96f901c7d158a38b1c5c2f78.zip
gcc-e3753785835fdb4c96f901c7d158a38b1c5c2f78.tar.gz
gcc-e3753785835fdb4c96f901c7d158a38b1c5c2f78.tar.bz2
varasm.c (default_use_anchors_for_symbol_p): Use decl_replaceable_p.
gcc/ * varasm.c (default_use_anchors_for_symbol_p): Use decl_replaceable_p. gcc/testsuite/ * gcc.dg/visibility-21.c: New. From-SVN: r198965
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 6fb49cf..5f62677 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -6580,9 +6580,9 @@ default_use_anchors_for_symbol_p (const_rtx symbol)
decl = SYMBOL_REF_DECL (symbol);
if (decl && DECL_P (decl))
{
- /* Don't use section anchors for decls that might be defined by
- other modules. */
- if (!targetm.binds_local_p (decl))
+ /* Don't use section anchors for decls that might be defined or
+ usurped by other modules. */
+ if (TREE_PUBLIC (decl) && !decl_binds_to_current_def_p (decl))
return false;
/* Don't use section anchors for decls that will be placed in a