From 1e50b042c434ecdf983720755a99b7f087192e09 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 17 Feb 1994 22:49:29 +0000 Subject: [PATCH] (duplicate_decls): Merge section name into new decl. From-SVN: r6583 --- gcc/c-decl.c | 7 +++++++ 1 file changed, 7 insertions(+) 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. */ -- 2.30.2