@@ -153,10 +153,8 @@ symbol_table::decl_assembler_name_equal (tree decl, const_tree asmname)
return assembler_names_equal_p (decl_str, asmname_str);
}
-/* Returns nonzero if P1 and P2 are equal. */
-
/* Insert NODE to assembler name hash. */
void
symbol_table::insert_to_assembler_name_hash (symtab_node *node,
@@ -302,8 +301,12 @@ symbol_table::change_decl_assembler_name (tree decl, tree name)
&& DECL_RTL_SET_P (decl))
warning (0, "%qD renamed after being referenced in assembly", decl);
SET_DECL_ASSEMBLER_NAME (decl, name);
+ /* Set the new name in rtl. */
+ if (DECL_RTL_SET_P (decl))
+ XSTR (XEXP (DECL_RTL (decl), 0), 0) = IDENTIFIER_POINTER (name);
+
if (alias)
{
IDENTIFIER_TRANSPARENT_ALIAS (name) = 1;
TREE_CHAIN (name) = alias;