Commit 06bb02f7 by Richard Kenner

(assemble_start_function, assemble_variable):

Make sure first_global_object_name is in permanent obstack.

From-SVN: r9862
parent 02db8dd0
......@@ -801,7 +801,14 @@ assemble_start_function (decl, fnname)
if (TREE_PUBLIC (decl))
{
if (!first_global_object_name)
STRIP_NAME_ENCODING (first_global_object_name, fnname);
{
char *p;
STRIP_NAME_ENCODING (p, fnname);
first_global_object_name = permalloc (strlen (p) + 1);
strcpy (first_global_object_name, p);
}
#ifdef ASM_WEAKEN_LABEL
if (DECL_WEAK (decl))
ASM_WEAKEN_LABEL (asm_out_file, fnname);
......@@ -1176,7 +1183,14 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
if (TREE_PUBLIC (decl) && DECL_NAME (decl))
{
if (!first_global_object_name)
STRIP_NAME_ENCODING(first_global_object_name, name);
{
char *p;
STRIP_NAME_ENCODING (p, name);
first_global_object_name = permalloc (strlen (p) + 1);
strcpy (first_global_object_name, p);
}
#ifdef ASM_WEAKEN_LABEL
if (DECL_WEAK (decl))
ASM_WEAKEN_LABEL (asm_out_file, name);
......
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