aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/svr3.h
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1994-03-18 15:43:00 -0800
committerJim Wilson <wilson@gcc.gnu.org>1994-03-18 15:43:00 -0800
commited8969fa7d85d9467bea0379ff4bca782708ac3f (patch)
treef0a28f279a86dda097db4b1543ece6ced2c93aa7 /gcc/config/svr3.h
parent07aeab22c0aa102a34c5fdd1b435964135271618 (diff)
downloadgcc-ed8969fa7d85d9467bea0379ff4bca782708ac3f.zip
gcc-ed8969fa7d85d9467bea0379ff4bca782708ac3f.tar.gz
gcc-ed8969fa7d85d9467bea0379ff4bca782708ac3f.tar.bz2
(SELECT_SECTION): Variables go in readonly data
only if the initializer is constant. From-SVN: r6820
Diffstat (limited to 'gcc/config/svr3.h')
-rw-r--r--gcc/config/svr3.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/config/svr3.h b/gcc/config/svr3.h
index 9f8ddc1..94cefb4 100644
--- a/gcc/config/svr3.h
+++ b/gcc/config/svr3.h
@@ -363,7 +363,10 @@ dtors_section () \
else if (TREE_CODE (DECL) == VAR_DECL) \
{ \
if ((0 && RELOC) /* should be (flag_pic && RELOC) */ \
- || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)) \
+ || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \
+ || !DECL_INITIAL (DECL) \
+ || (DECL_INITIAL (DECL) != error_mark_node \
+ && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \
data_section (); \
else \
const_section (); \