From ed8969fa7d85d9467bea0379ff4bca782708ac3f Mon Sep 17 00:00:00 2001 From: Jim Wilson Date: Fri, 18 Mar 1994 15:43:00 -0800 Subject: (SELECT_SECTION): Variables go in readonly data only if the initializer is constant. From-SVN: r6820 --- gcc/config/svr3.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/config/svr3.h') 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 (); \ -- cgit v1.1