PR ipa/61886
* varpool.c (varpool_node::get_availability): Recurse only on
weakrefs with definition in the target.
(symbol_table::remove_unreferenced_decls): Keep aliases in the boundary.
From-SVN: r231429
2015-12-08 Jan Hubicka <hubicka@ucw.cz>
PR ipa/61886
- * ipa-visibility.c (can_replace_by_local_alias): Look through transparent
- aliaes; refuse weakrefs.
+ * varpool.c (varpool_node::get_availability): Recurse only on
+ weakrefs with definition in the target.
+ (symbol_table::remove_unreferenced_decls): Keep aliases in the boundary.
+
+2015-12-08 Jan Hubicka <hubicka@ucw.cz>
+
+ PR ipa/61886
+ * ipa-visibility.c (can_replace_by_local_alias): Look through
+ transparent aliases; refuse weakrefs.
(update_visibility_by_resolution_info): Skip transparent aliases in the
analysis part
if (DECL_IN_CONSTANT_POOL (decl)
|| DECL_VIRTUAL_P (decl))
return AVAIL_AVAILABLE;
- if (transparent_alias)
+ if (transparent_alias && definition)
{
enum availability avail;
enqueue_node (vnode, &first);
else
{
- referenced.add (node);
- while (node->alias && node->definition)
+ referenced.add (vnode);
+ while (vnode && vnode->alias && vnode->definition)
{
- node = node->get_alias_target ();
- referenced.add (node);
+ vnode = vnode->get_alias_target ();
+ referenced.add (vnode);
}
}
}