varasm.c (asm_emit_uninitialised): Revert 2002-03-14 change.
authorRichard Henderson <rth@redhat.com>
Mon, 25 Mar 2002 00:44:36 +0000 (16:44 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 25 Mar 2002 00:44:36 +0000 (16:44 -0800)
        * 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.

From-SVN: r51289

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/weak-1.c
gcc/varasm.c

index ce88f317cdfef227879db9da804ee464ae388391..7ac7150c19dc417834f86eede85f6e1a02290147 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-24  Richard Henderson  <rth@redhat.com>
+
+       * varasm.c (asm_emit_uninitialised): Revert 2002-03-14 change.
+       Do resolve_unique_section before shared data clause.
+
 2002-03-24  Richard Henderson  <rth@redhat.com>
 
        * config/alpha/elf.h (STARTFILE_SPEC): Use crtbeginT with -static.
index ac4d80e06c1b25ac8b7ab9f55e15f47916dea6f6..528a2dc3a11d6a28bb8d7263bf1dacea46183cf5 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-24  Richard Henderson  <rth@redhat.com>
+
+       * gcc.dg/weak-1.c: Use -fno-common.
+
 2002-03-25  David Billinghurst  <David.Billinghurst@riotinto.com>
 
        * g77.dg/f77-edit-apostrophe-out.f: New test
index 7273bec173490ae55c3bd2b972f76a444f374e31..2e736f8f186936c4ecffb5f6c5ed533b35087c47 100644 (file)
@@ -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 ef9e87242cd4428e5241b45d9a30056c2ecdbfd7..ad0ef708abf7b02abb030432b1ecc9dbacf47c1e 100644 (file)
@@ -1395,16 +1395,9 @@ asm_emit_uninitialised (decl, name, size, rounded)
        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 (destination == asm_dest_bss)
+    globalize_decl (decl);
+  resolve_unique_section (decl, 0);
 
   if (flag_shared_data)
     {
@@ -1430,8 +1423,6 @@ asm_emit_uninitialised (decl, name, size, rounded)
        }
     }
 
-  resolve_unique_section (decl, 0);
-
   switch (destination)
     {
 #ifdef ASM_EMIT_BSS