From: Fariborz Jahanian Date: Sat, 4 Oct 2003 16:49:26 +0000 (+0000) Subject: retain DECL_COMMON of old declaration X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b68a40b2805a9bc17fa85a661561f743c51fb679;p=gcc.git retain DECL_COMMON of old declaration Reviewed by Geoffrey Keating. From-SVN: r72094 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e166c9378d..c0786895aae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-10-04 Fariborz Jahanian + + * c-decl.c (duplicate_decls): retain DECL_COMMON of old declaration + 2003-10-03 Gerald Pfeifer * doc/extend.texi (Function Attributes): Fix title of GNU C diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 69110efa477..7880f7f271b 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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)