aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2003-10-04 16:49:26 +0000
committerFariborz Jahanian <fjahanian@gcc.gnu.org>2003-10-04 16:49:26 +0000
commitb68a40b2805a9bc17fa85a661561f743c51fb679 (patch)
tree06ad989358f33a57089df05484ab306f12bc17e2 /gcc/c-decl.c
parentdff186db0911922256dfce2dbb7512345823038a (diff)
downloadgcc-b68a40b2805a9bc17fa85a661561f743c51fb679.zip
gcc-b68a40b2805a9bc17fa85a661561f743c51fb679.tar.gz
gcc-b68a40b2805a9bc17fa85a661561f743c51fb679.tar.bz2
retain DECL_COMMON of old declaration
Reviewed by Geoffrey Keating. From-SVN: r72094
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 69110ef..7880f7f 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)