Commit 1e50b042 by Doug Evans

(duplicate_decls): Merge section name into new decl.

From-SVN: r6583
parent 5289b665
...@@ -1671,6 +1671,13 @@ duplicate_decls (newdecl, olddecl) ...@@ -1671,6 +1671,13 @@ duplicate_decls (newdecl, olddecl)
/* Merge the initialization information. */ /* Merge the initialization information. */
if (DECL_INITIAL (newdecl) == 0) if (DECL_INITIAL (newdecl) == 0)
DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl); 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, /* If cannot merge, then use the new type and qualifiers,
and don't preserve the old rtl. */ and don't preserve the old rtl. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment