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/nextstep.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/nextstep.h')
-rw-r--r-- | gcc/config/nextstep.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/config/nextstep.h b/gcc/config/nextstep.h index 3fc507a2156..d6e7003cfe8 100644 --- a/gcc/config/nextstep.h +++ b/gcc/config/nextstep.h @@ -536,11 +536,19 @@ objc_section_init () \ else \ data_section (); \ } \ - else if ((TREE_READONLY (exp) || TREE_CONSTANT (exp)) \ - && !TREE_SIDE_EFFECTS (exp)) \ - readonly_data_section (); \ + else if (TREE_CODE (DECL) == VAR_DECL) \ + { \ + if ((flag_pic && RELOC) \ + || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ + || !DECL_INITIAL (DECL) \ + || (DECL_INITIAL (DECL) != error_mark_node \ + && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \ + data_section (); \ + else \ + readonly_data_section (); \ + } \ else \ - data_section (); \ + readonly_data_section (); \ } \ while (0) |