This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix unique symbol production in unit-at-a-time
- From: Jan Hubicka <jh at suse dot cz>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, gcc-patches at gcc dot gnu dot org,Geoff Keating <geoffk at geoffk dot org>
- Date: Tue, 26 Aug 2003 19:02:01 +0200
- Subject: Re: Fix unique symbol production in unit-at-a-time
- References: <20030823213314.GA25290@kam.mff.cuni.cz> <200308240033.h7O0XqN28962@tin.geop.uc.edu>
> > Hi,
> > the attached patch should fix the problem. Can you please test it?
> > Sorry for the delay - I was traveling past few days so didn't had chance
> > to look into this earlier.
> >
> > Honza
> >
>
> Nope this patch did not work, I will send the new asm latter but it will not
> look differently I do not think.
This is strange as in my crosscompiler everything looks fine. However
the patch failed on another testcase I have for this problem so I made
different. This time I feel pretty confident that I imitate logic of
the old code exactly.
Would be possible to try it out?
Honza
Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.380
diff -c -3 -p -r1.380 varasm.c
*** varasm.c 19 Aug 2003 07:37:07 -0000 1.380
--- varasm.c 26 Aug 2003 13:40:42 -0000
*************** default_ctor_section_asm_out_constructor
*** 1047,1054 ****
void
notice_global_symbol (tree decl)
{
! if ((!first_global_object_name || !weak_global_object_name)
! && TREE_PUBLIC (decl)
&& (TREE_CODE (decl) == FUNCTION_DECL
|| ! (DECL_COMMON (decl)
&& (DECL_INITIAL (decl) == 0
--- 1047,1054 ----
void
notice_global_symbol (tree decl)
{
! if (!first_global_object_name
! && TREE_PUBLIC (decl) && DECL_NAME (decl)
&& (TREE_CODE (decl) == FUNCTION_DECL
|| ! (DECL_COMMON (decl)
&& (DECL_INITIAL (decl) == 0