lto-cgraph.c (get_alias_symbol): Remove weakref sanity check.
* lto-cgraph.c (get_alias_symbol): Remove weakref sanity check. (input_node, input_varpool_node): Handle correctly external same body aliases. * ipa.c (symtab_remove_unreachable_nodes): Do not remove external nodes at ltrans stage. From-SVN: r199675
This commit is contained in:
parent
aaae719df3
commit
b9bd2075e2
3 changed files with 17 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
|||
2013-06-04 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* lto-cgraph.c (get_alias_symbol): Remove weakref sanity check.
|
||||
(input_node, input_varpool_node): Handle correctly external same
|
||||
body aliases.
|
||||
* ipa.c (symtab_remove_unreachable_nodes): Do not remove external
|
||||
nodes at ltrans stage.
|
||||
|
||||
2013-06-04 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* ipa-inline.c (update_caller_keys): Fix availability test.
|
||||
|
|
|
@ -387,7 +387,11 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
|
|||
for (vnode = varpool_first_variable (); vnode; vnode = vnext)
|
||||
{
|
||||
vnext = varpool_next_variable (vnode);
|
||||
if (!vnode->symbol.aux)
|
||||
if (!vnode->symbol.aux
|
||||
/* For can_refer_decl_in_current_unit_p we want to track for
|
||||
all external variables if they are defined in other partition
|
||||
or not. */
|
||||
&& (!flag_ltrans || !DECL_EXTERNAL (vnode->symbol.decl)))
|
||||
{
|
||||
if (file)
|
||||
fprintf (file, " %s", varpool_node_name (vnode));
|
||||
|
|
|
@ -918,7 +918,6 @@ static tree
|
|||
get_alias_symbol (tree decl)
|
||||
{
|
||||
tree alias = lookup_attribute ("alias", DECL_ATTRIBUTES (decl));
|
||||
gcc_assert (lookup_attribute ("weakref", DECL_ATTRIBUTES (decl)));
|
||||
return get_identifier (TREE_STRING_POINTER
|
||||
(TREE_VALUE (TREE_VALUE (alias))));
|
||||
}
|
||||
|
@ -1008,7 +1007,8 @@ input_node (struct lto_file_decl_data *file_data,
|
|||
node->thunk.virtual_value = virtual_value;
|
||||
node->thunk.virtual_offset_p = (type & 4);
|
||||
}
|
||||
if (node->symbol.alias && !node->symbol.analyzed)
|
||||
if (node->symbol.alias && !node->symbol.analyzed
|
||||
&& lookup_attribute ("weakref", DECL_ATTRIBUTES (node->symbol.decl)))
|
||||
node->symbol.alias_target = get_alias_symbol (node->symbol.decl);
|
||||
return node;
|
||||
}
|
||||
|
@ -1050,7 +1050,8 @@ input_varpool_node (struct lto_file_decl_data *file_data,
|
|||
DECL_EXTERNAL (node->symbol.decl) = 1;
|
||||
TREE_STATIC (node->symbol.decl) = 0;
|
||||
}
|
||||
if (node->symbol.alias && !node->symbol.analyzed)
|
||||
if (node->symbol.alias && !node->symbol.analyzed
|
||||
&& lookup_attribute ("weakref", DECL_ATTRIBUTES (node->symbol.decl)))
|
||||
node->symbol.alias_target = get_alias_symbol (node->symbol.decl);
|
||||
ref = streamer_read_hwi (ib);
|
||||
/* Store a reference for now, and fix up later to be a pointer. */
|
||||
|
|
Loading…
Add table
Reference in a new issue