aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@redhat.com>2000-11-16 20:01:21 +0000
committerJim Wilson <wilson@gcc.gnu.org>2000-11-16 12:01:21 -0800
commit74fe26b270f55b1245d6cb863fca3734003a277a (patch)
tree6684eac7bde7358cf16bc79ae108633469c0d936
parente24fa9dac1d7f5d1a628f04a1952a38eff8d2d23 (diff)
downloadgcc-74fe26b270f55b1245d6cb863fca3734003a277a.zip
gcc-74fe26b270f55b1245d6cb863fca3734003a277a.tar.gz
gcc-74fe26b270f55b1245d6cb863fca3734003a277a.tar.bz2
Fix ia64 C++ gprel link errors.
* config/ia64/ia64.c (ia64_encode_section_info): Disallow decls with DECL_EXTERNAL set. From-SVN: r37505
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/ia64/ia64.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9866dc4..b735f44 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-11-16 Jim Wilson <wilson@redhat.com>
+
+ * config/ia64/ia64.c (ia64_encode_section_info): Disallow decls with
+ DECL_EXTERNAL set.
+
2000-11-16 Nick Clifton <nickc@redhat.com>
* config/arm/arm.c (output_arm_prologue): Note nested functions.
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 87cc12d..ee8121f 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -4764,8 +4764,12 @@ ia64_encode_section_info (decl)
/* ??? Actually, we can put globals in sdata, as long as we don't use gprel
to access them. The linker may then be able to do linker relaxation to
optimize references to them. Currently sdata implies use of gprel. */
+ /* We need the DECL_EXTERNAL check for C++. static class data members get
+ both TREE_STATIC and DECL_EXTERNAL set, to indicate that they are
+ statically allocated, but the space is allocated somewhere else. Such
+ decls can not be own data. */
if (! TARGET_NO_SDATA
- && TREE_STATIC (decl)
+ && TREE_STATIC (decl) && ! DECL_EXTERNAL (decl)
&& ! (DECL_ONE_ONLY (decl) || DECL_WEAK (decl))
&& ! (TREE_PUBLIC (decl)
&& (flag_pic