summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-04 16:49:26 +0000
committerfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2003-10-04 16:49:26 +0000
commit3bd8ea96c2dbfcb823784337900e641dc8c98498 (patch)
tree06ad989358f33a57089df05484ab306f12bc17e2
parente78731fe871ede8cc4013c0614de8cfd94a32972 (diff)
downloadppe42-gcc-3bd8ea96c2dbfcb823784337900e641dc8c98498.tar.gz
ppe42-gcc-3bd8ea96c2dbfcb823784337900e641dc8c98498.zip
retain DECL_COMMON of old declaration
Reviewed by Geoffrey Keating. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72094 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/c-decl.c1
2 files changed, 5 insertions, 0 deletions
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 <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
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)
OpenPOWER on IntegriCloud