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]

(C++) init_priority patch


We were crashing on code that applied init_priority to a redeclaration.
This isn't the right fix, but it'll hold us until I have more time.

1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>

	* decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
	of the decls themselves.

Index: decl2.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/decl2.c,v
retrieving revision 1.199
diff -c -p -r1.199 decl2.c
*** decl2.c	1999/04/13 18:09:57	1.199
--- decl2.c	1999/04/14 06:53:21
*************** setup_initp ()
*** 2897,2903 ****
    p = &static_aggregates;
    for (; *p; )
      {
!       t = value_member (TREE_VALUE (*p), static_aggregates_initp);
  
        if (t)
  	{
--- 2897,2910 ----
    p = &static_aggregates;
    for (; *p; )
      {
!       /* We check for symbol equivalence rather than identical decls
! 	 because decl_attributes is run before duplicate_decls.
! 	 XXX change to use DECL_MACHINE_ATTRIBUTES instead of
! 	 static_aggregates_initp.  */
!       for (t = static_aggregates_initp; t; t = TREE_CHAIN (t))
! 	if (DECL_ASSEMBLER_NAME (TREE_VALUE (t))
! 	    == DECL_ASSEMBLER_NAME (TREE_VALUE (*p)))
! 	  break;
  
        if (t)
  	{


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