diff options
author | Doug Evans <dje@gnu.org> | 1994-02-17 22:49:29 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1994-02-17 22:49:29 +0000 |
commit | 1e50b042c434ecdf983720755a99b7f087192e09 (patch) | |
tree | 88bca7e4941373049a3e589a993d52b035d4c033 | |
parent | 5289b66589cf2d63bf7cc780322d2d81e198970b (diff) | |
download | gcc-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.c | 7 |
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. */ |