rs6000.c (rs6000_select_section): Handle CONSTRUCTORs too.
authorGeoffrey Keating <geoffk@redhat.com>
Mon, 5 Nov 2001 21:04:07 +0000 (21:04 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Mon, 5 Nov 2001 21:04:07 +0000 (21:04 +0000)
* config/rs6000/rs6000.c (rs6000_select_section): Handle
CONSTRUCTORs too.

From-SVN: r46792

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index f19be3582e35b061ca9d33d9999101cdcf1c5a70..06d054243a46c222623b0ece2c2c8a6ba425b56d 100644 (file)
@@ -1,3 +1,8 @@
+2001-11-05  Geoffrey Keating  <geoffk@redhat.com>
+
+       * config/rs6000/rs6000.c (rs6000_select_section): Handle
+       CONSTRUCTORs too.
+
 2001-11-05  Nick Clifton  <nickc@cambridge.redhat.com>
 
        * config/arm/arm.c (arm_return_in_memory): Cope with
index 5d0fcad4aea589f8b2487f53a15e8d47d83e6222..6be9db72a9595395072313313749bd3d622567dc 100644 (file)
@@ -8311,6 +8311,11 @@ rs6000_select_section (decl, reloc)
                && DECL_INITIAL (decl)
                && DECL_INITIAL (decl) != error_mark_node
                && TREE_CONSTANT (DECL_INITIAL (decl)));
+  else if (TREE_CODE (decl) == CONSTRUCTOR)
+    readonly = (! (flag_pic && reloc)
+               && TREE_READONLY (decl)
+               && ! TREE_SIDE_EFFECTS (decl)
+               && TREE_CONSTANT (DECL_INITIAL (decl)));
   else
     readonly = 1;
   if (needs_sdata && rs6000_sdata != SDATA_EABI)