PR gcc/84923
* varasm.c (weak_finish): Clean up weak_decls.
From-SVN: r260485
+2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
+
+ PR gcc/84923
+ * varasm.c (weak_finish): Clean up weak_decls.
+
2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
tree alias_decl = TREE_PURPOSE (t);
tree target = ultimate_transparent_alias_target (&TREE_VALUE (t));
- if (! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias_decl)))
+ if (! TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias_decl))
+ || TREE_SYMBOL_REFERENCED (target))
/* Remove alias_decl from the weak list, but leave entries for
the target alone. */
target = NULL_TREE;