This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) init_priority patch
- To: egcs-patches at cygnus dot com
- Subject: (C++) init_priority patch
- From: Jason Merrill <jason at cygnus dot com>
- Date: Wed, 14 Apr 1999 00:00:04 -0700
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)
{