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]
Other format: [Raw text]

Re: Weak changes cause arm/NetBSD bootstrap failure.


On Sat, Mar 23, 2002 at 11:20:04AM +0000, Richard Earnshaw wrote:
> 2002-03-14  Richard Henderson  <rth@redhat.com>
> 
> 	...
> 	* varasm.c
> 	...
> 	(asm_emit_uninitialised): Call globalize_decl for weak commons.
> 
> is breaking a bootstrap on ARM/NetBSD.

Fixed thus.


r~


        * varasm.c (asm_emit_uninitialised): Revert 2002-03-14 change.
        Do resolve_unique_section before shared data clause.

        * gcc.dg/weak-1.c: Use -fno-common.

Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.262
diff -c -p -d -r1.262 varasm.c
*** varasm.c	2002/03/23 01:10:34	1.262
--- varasm.c	2002/03/25 00:40:05
*************** asm_emit_uninitialised (decl, name, size
*** 1395,1410 ****
  	destination = asm_dest_common;
      }
  
!   switch (destination)
!     {
!     case asm_dest_common:
!       if (! DECL_WEAK (decl))
! 	break;
!     case asm_dest_bss:
!       globalize_decl (decl);
!     default:
!       break;
!     }
  
    if (flag_shared_data)
      {
--- 1395,1403 ----
  	destination = asm_dest_common;
      }
  
!   if (destination == asm_dest_bss)
!     globalize_decl (decl);
!   resolve_unique_section (decl, 0);
  
    if (flag_shared_data)
      {
*************** asm_emit_uninitialised (decl, name, size
*** 1429,1436 ****
  	  break;
  	}
      }
- 
-   resolve_unique_section (decl, 0);
  
    switch (destination)
      {
--- 1422,1427 ----
Index: testsuite/gcc.dg/weak-1.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/weak-1.c,v
retrieving revision 1.3
diff -c -p -d -r1.3 weak-1.c
*** testsuite/gcc.dg/weak-1.c	2002/03/24 23:52:20	1.3
--- testsuite/gcc.dg/weak-1.c	2002/03/25 00:40:06
***************
*** 1,4 ****
--- 1,6 ----
  /* { dg-do compile } */
+ /* { dg-options "-fno-common" } */
+ 
  /* COFF does not support weak, and dg doesn't support UNSUPPORTED.  */
  /* { dg-do compile { xfail *-*-coff i?86-pc-cygwin } } */
  


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