aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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