aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1999-09-06 23:49:18 -0600
committerJeff Law <law@gcc.gnu.org>1999-09-06 23:49:18 -0600
commitc5c7673583c6310e7f8e45704fdc4aadff33e393 (patch)
treef1a67b6ea75a7f0da3f06e0a1c60b213f4403168 /gcc/c-decl.c
parentad85216ece38be37dacbbb3fa7bb7db69aa33a4b (diff)
downloadgcc-c5c7673583c6310e7f8e45704fdc4aadff33e393.zip
gcc-c5c7673583c6310e7f8e45704fdc4aadff33e393.tar.gz
gcc-c5c7673583c6310e7f8e45704fdc4aadff33e393.tar.bz2
Merge in gcc2-ss-010999
From-SVN: r29150
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index d4c4fe1..c2d04c1 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1925,6 +1925,10 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
if (DECL_SECTION_NAME (newdecl) == NULL_TREE)
DECL_SECTION_NAME (newdecl) = DECL_SECTION_NAME (olddecl);
+ /* Copy the assembler name.
+ Currently, it can only be defined in the prototype. */
+ DECL_ASSEMBLER_NAME (newdecl) = DECL_ASSEMBLER_NAME (olddecl);
+
if (TREE_CODE (newdecl) == FUNCTION_DECL)
{
DECL_STATIC_CONSTRUCTOR(newdecl) |= DECL_STATIC_CONSTRUCTOR(olddecl);
@@ -3740,6 +3744,7 @@ finish_decl (decl, init, asmspec_tree)
{
DECL_BUILT_IN (decl) = 0;
DECL_RTL (decl) = 0;
+ DECL_ASSEMBLER_NAME (decl) = get_identifier (asmspec);
}
/* Output the assembler code and/or RTL code for variables and functions,
@@ -7005,7 +7010,8 @@ finish_function (nested)
static_ctors = perm_tree_cons (NULL_TREE, fndecl, static_ctors);
else
#endif
- assemble_constructor (IDENTIFIER_POINTER (DECL_NAME (fndecl)));
+ assemble_constructor (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)));
+
}
if (DECL_STATIC_DESTRUCTOR (fndecl))
{
@@ -7014,7 +7020,7 @@ finish_function (nested)
static_dtors = perm_tree_cons (NULL_TREE, fndecl, static_dtors);
else
#endif
- assemble_destructor (IDENTIFIER_POINTER (DECL_NAME (fndecl)));
+ assemble_destructor (IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)));
}
if (! nested)