This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Bugfix for prolem in elfos.h


Fri May 19 06:49:35 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* config/elfos.h (SELECT_SECTION): Don't access DECL_INITIAL of
	a CONSTRUCTOR.

*** config/elfos.h	2000/04/12 00:29:43	1.16
--- config/elfos.h	2000/05/19 10:39:34
*************** dtors_section ()						\
*** 485,490 ****
  	data_section ();					\
      }								\
!   else if (TREE_CODE (DECL) == VAR_DECL				\
! 	   || TREE_CODE (DECL) == CONSTRUCTOR)			\
      {								\
        if ((flag_pic && RELOC)					\
--- 485,489 ----
  	data_section ();					\
      }								\
!   else if (TREE_CODE (DECL) == VAR_DECL)			\
      {								\
        if ((flag_pic && RELOC)					\
*************** dtors_section ()						\
*** 493,496 ****
--- 492,504 ----
  	  || (DECL_INITIAL (DECL) != error_mark_node		\
  	      && !TREE_CONSTANT (DECL_INITIAL (DECL))))		\
+ 	data_section ();					\
+       else							\
+ 	const_section ();					\
+     }								\
+   else if (TREE_CODE (DECL) == CONSTRUCTOR)			\
+     {								\
+       if ((flag_pic && RELOC)					\
+ 	  || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)	\
+ 	  || ! TREE_CONSTANT (DECL))				\
  	data_section ();					\
        else							\

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]