Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc.old/dist/gcc sync with the code with have ...
details: https://anonhg.NetBSD.org/src/rev/4ae34c936ac6
branches: trunk
changeset: 344027:4ae34c936ac6
user: christos <christos%NetBSD.org@localhost>
date: Thu Mar 10 14:40:00 2016 +0000
description:
sync with the code with have in the current copy of gcc.
diffstat:
external/gpl3/gcc.old/dist/gcc/varasm.c | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diffs (66 lines):
diff -r eb6795d5c87b -r 4ae34c936ac6 external/gpl3/gcc.old/dist/gcc/varasm.c
--- a/external/gpl3/gcc.old/dist/gcc/varasm.c Thu Mar 10 11:32:10 2016 +0000
+++ b/external/gpl3/gcc.old/dist/gcc/varasm.c Thu Mar 10 14:40:00 2016 +0000
@@ -6622,7 +6622,7 @@
wrt cross-module name binding. */
static bool
default_binds_local_p_3 (const_tree exp, bool shlib, bool weak_dominate,
- bool extern_protected_data)
+ bool extern_protected_data, bool common_local_p)
{
/* A non-decl is an entry in the constant pool. */
if (!DECL_P (exp))
@@ -6647,7 +6647,15 @@
because dynamic linking might overwrite symbols
in shared libraries. */
bool resolved_locally = false;
- bool defined_locally = !DECL_EXTERNAL (exp);
+
+ bool uninited_common = (DECL_COMMON (exp)
+ && (DECL_INITIAL (exp) == NULL
+ || (!in_lto_p
+ && DECL_INITIAL (exp) == error_mark_node)));
+
+ bool defined_locally = (!DECL_EXTERNAL (exp)
+ && (!uninited_common || common_local_p));
+
if (TREE_CODE (exp) == VAR_DECL && TREE_PUBLIC (exp)
&& (TREE_STATIC (exp) || DECL_EXTERNAL (exp)))
{
@@ -6702,10 +6710,7 @@
/* Uninitialized COMMON variable may be unified with symbols
resolved from other modules. */
- if (DECL_COMMON (exp)
- && !resolved_locally
- && (DECL_INITIAL (exp) == NULL
- || (!in_lto_p && DECL_INITIAL (exp) == error_mark_node)))
+ if (uninited_common && !resolved_locally)
return false;
/* Otherwise we're left with initialized (or non-common) global data
@@ -6716,13 +6721,13 @@
bool
default_binds_local_p (const_tree exp)
{
- return default_binds_local_p_3 (exp, flag_shlib != 0, true, false);
+ return default_binds_local_p_3 (exp, flag_shlib != 0, true, false, false);
}
bool
default_binds_local_p_1 (const_tree exp, int shlib)
{
- return default_binds_local_p_3 (exp, shlib != 0, false, false);
+ return default_binds_local_p_3 (exp, shlib != 0, false, false, false);
}
/* Similar to default_binds_local_p, but protected data may be
@@ -6730,7 +6735,7 @@
bool
default_binds_local_p_2 (const_tree exp)
{
- return default_binds_local_p_3 (exp, flag_shlib != 0, true, true);
+ return default_binds_local_p_3 (exp, flag_shlib != 0, true, true, !flag_pic);
}
/* Return true when references to DECL must bind to current definition in
Home |
Main Index |
Thread Index |
Old Index