aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@gnu.org>1994-02-17 22:49:29 +0000
committerDoug Evans <dje@gnu.org>1994-02-17 22:49:29 +0000
commit1e50b042c434ecdf983720755a99b7f087192e09 (patch)
tree88bca7e4941373049a3e589a993d52b035d4c033
parent5289b66589cf2d63bf7cc780322d2d81e198970b (diff)
downloadgcc-1e50b042c434ecdf983720755a99b7f087192e09.zip
gcc-1e50b042c434ecdf983720755a99b7f087192e09.tar.gz
gcc-1e50b042c434ecdf983720755a99b7f087192e09.tar.bz2
(duplicate_decls): Merge section name into new decl.
From-SVN: r6583
-rw-r--r--gcc/c-decl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index dbb1f62..d0bbad1 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1671,6 +1671,13 @@ duplicate_decls (newdecl, olddecl)
/* Merge the initialization information. */
if (DECL_INITIAL (newdecl) == 0)
DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
+
+ /* Merge the section attribute.
+ We want to issue an error if the sections conflict but that must be
+ done later in decl_attributes since we are called before attributes
+ are assigned. */
+ if (DECL_SECTION_NAME (newdecl) == NULL_TREE)
+ DECL_SECTION_NAME (newdecl) = DECL_SECTION_NAME (olddecl);
}
/* If cannot merge, then use the new type and qualifiers,
and don't preserve the old rtl. */