diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 034299cb1fb..f3ef8a074bb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2013-06-04 Jan Hubicka + + PR middle-end/57500 + * cgraphunit.c (cgraph_process_same_body_aliases): Create + non-VAR_DECL node if it does not exist yet. + 2013-06-03 Richard Sandiford * config.gcc (mipsisa64sr71k-*-elf*, mipsisa64sb1-*-elf*) diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 6143e8f3bbb..9a4d0dfc5d6 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -656,8 +656,11 @@ cgraph_process_same_body_aliases (void) symtab_node node; FOR_EACH_SYMBOL (node) if (node->symbol.cpp_implicit_alias && !node->symbol.analyzed) - symtab_resolve_alias (node, - symtab_get_node (node->symbol.alias_target)); + symtab_resolve_alias + (node, + TREE_CODE (node->symbol.alias_target) == VAR_DECL + ? (symtab_node)varpool_node_for_decl (node->symbol.alias_target) + : (symtab_node)cgraph_get_create_node (node->symbol.alias_target)); cpp_implicit_aliases_done = true; }