misc.c (gnat_printable_name): Always return a copy in GC memory.

* gcc-interface/misc.c (gnat_printable_name): Always return a copy
	in GC memory.

From-SVN: r141638
This commit is contained in:
Eric Botcazou 2008-11-06 11:42:52 +00:00 committed by Eric Botcazou
parent 8b659f794a
commit baf6e6a838
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2008-11-06 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/misc.c (gnat_printable_name): Always return a copy
in GC memory.
2008-11-06 Eric Botcazou <ebotcazou@adacore.com>
PR ada/19419

View File

@ -603,10 +603,10 @@ gnat_printable_name (tree decl, int verbosity)
if (verbosity == 2)
{
Set_Identifier_Casing (ada_name, (char *) DECL_SOURCE_FILE (decl));
ada_name = Name_Buffer;
return ggc_strdup (Name_Buffer);
}
return (const char *) ada_name;
else
return ada_name;
}
/* Expands GNAT-specific GCC tree nodes. The only ones we support