From: Doug Evans Date: Thu, 17 Feb 1994 22:49:29 +0000 (+0000) Subject: (duplicate_decls): Merge section name into new decl. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e50b042c434ecdf983720755a99b7f087192e09;p=gcc.git (duplicate_decls): Merge section name into new decl. From-SVN: r6583 --- diff --git a/gcc/c-decl.c b/gcc/c-decl.c index dbb1f624b13..d0bbad1a500 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. */