retain DECL_COMMON of old declaration
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 4 Oct 2003 16:49:26 +0000 (16:49 +0000)
committerFariborz Jahanian <fjahanian@gcc.gnu.org>
Sat, 4 Oct 2003 16:49:26 +0000 (16:49 +0000)
Reviewed by Geoffrey Keating.

From-SVN: r72094

gcc/ChangeLog
gcc/c-decl.c

index 6e166c9378de078663d935ef841f121eac1645e4..c0786895aaee134e5de257ed96363d8f57799d48 100644 (file)
@@ -1,3 +1,7 @@
+2003-10-04  Fariborz Jahanian  <fjahanian@apple.com>
+
+       * c-decl.c (duplicate_decls): retain DECL_COMMON of old declaration
+
 2003-10-03  Gerald Pfeifer  <gerald@pfeifer.com>
 
        * doc/extend.texi (Function Attributes): Fix title of GNU C
index 69110efa4778caf223fa5e4543343e15c736b3c6..7880f7f271bfd7935cd265302d4291993df8f33d 100644 (file)
@@ -1385,6 +1385,7 @@ duplicate_decls (tree newdecl, tree olddecl, int different_binding_level,
       if (! DECL_EXTERNAL (newdecl))
        {
          DECL_CONTEXT (newdecl) = DECL_CONTEXT (olddecl);
+         DECL_COMMON (newdecl) = DECL_COMMON (olddecl);
          /* If we have two non-EXTERNAL file-scope decls that are
             the same, only one of them should be written out.  */
          if (different_tu)