aboutsummaryrefslogtreecommitdiff
path: root/gcc/varasm.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-04-17 00:34:34 -0700
committerRichard Henderson <rth@gcc.gnu.org>2003-04-17 00:34:34 -0700
commit1b8135a411e5ba31ce74b9645481a50c34d7f3d5 (patch)
tree0630a6f75e02a0384bb1d5521d6742074c9df781 /gcc/varasm.c
parent6d7fe8b31ff02652f8090903eb5882587b681a1d (diff)
downloadgcc-1b8135a411e5ba31ce74b9645481a50c34d7f3d5.zip
gcc-1b8135a411e5ba31ce74b9645481a50c34d7f3d5.tar.gz
gcc-1b8135a411e5ba31ce74b9645481a50c34d7f3d5.tar.bz2
varasm.c (default_encode_section_info): Don't set SYMBOL_FLAG_EXTERNAL if not TREE_PUBLIC.
* varasm.c (default_encode_section_info): Don't set SYMBOL_FLAG_EXTERNAL if not TREE_PUBLIC. * config/i370/i370.c (i370_encode_section_info): Remove. * config/i370/i370.h (CONSTANT_ADDRESS_P): Use SYMBOL_REF_EXTERNAL_P. (PRINT_OPERAND, PRINT_OPERAND_ADDRESS): Likewise. * config/i370/i370.md (movsi): Likewise. * config/i370/t-i370: Add missing backslash. From-SVN: r65728
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r--gcc/varasm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 684a824..a517450 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -5371,7 +5371,10 @@ default_encode_section_info (decl, first)
flags |= SYMBOL_FLAG_SMALL;
if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL (decl))
flags |= decl_tls_model (decl) << SYMBOL_FLAG_TLS_SHIFT;
- if (DECL_P (decl) && DECL_EXTERNAL (decl))
+ /* ??? Why is DECL_EXTERNAL ever set for non-PUBLIC names? Without
+ being PUBLIC, the thing *must* be defined in this translation unit.
+ Prevent this buglet from being propagated into rtl code as well. */
+ if (DECL_P (decl) && DECL_EXTERNAL (decl) && TREE_PUBLIC (decl))
flags |= SYMBOL_FLAG_EXTERNAL;
SYMBOL_REF_FLAGS (symbol) = flags;