re PR middle-end/57500 (Segfault in ipa_record_reference)

2013-06-04  Jan Hubicka  <jh@suse.cz>

        PR middle-end/57500
        * cgraphunit.c (cgraph_process_same_body_aliases): Create
        non-VAR_DECL node if it does not exist yet.

From-SVN: r199634
This commit is contained in:
Jan Hubicka 2013-06-04 04:33:46 +02:00 committed by David Edelsohn
parent 3d5d3d4335
commit cb0f665d14
2 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2013-06-04 Jan Hubicka <jh@suse.cz>
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 <rdsandiford@googlemail.com>
* config.gcc (mipsisa64sr71k-*-elf*, mipsisa64sb1-*-elf*)

View File

@ -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;
}