Fix unique symbol production in unit-at-a-time

Jan Hubicka jh@suse.cz
Tue Aug 26 17:01:00 GMT 2003


> > 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



More information about the Gcc-patches mailing list