diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-03-18 23:43:00 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-03-18 23:43:00 +0000 |
commit | 193de2ab3c0a8fc92003517939810bc52d556e87 (patch) | |
tree | f0a28f279a86dda097db4b1543ece6ced2c93aa7 /gcc/config/svr3.h | |
parent | 3da35046312275cf4046f78fa135a4a2c1615cac (diff) | |
download | gcc-193de2ab3c0a8fc92003517939810bc52d556e87.tar.gz |
(SELECT_SECTION): Variables go in readonly data
only if the initializer is constant.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6820 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/svr3.h')
-rw-r--r-- | gcc/config/svr3.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/config/svr3.h b/gcc/config/svr3.h index 9f8ddc1530b..94cefb44f3e 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 (); \ |