re PR ipa/58329 (ld: Invalid symbol type for plabel (.libs/libstdc++.lax/libc++11convenience.a/system_error.o, std::error_category::default_error_condition(int) const [clone .localalias.9]).)

PR middle-end/58329
	* ipa-devirt.c (ipa_devirt): Be ready for symtab_nonoverwritable_alias
	to return NULL.
	* ipa.c (function_and_variable_visibility): Likewise.
	* ipa-profile.c (ipa_profile): Likewise.

From-SVN: r202657
This commit is contained in:
Jan Hubicka 2013-09-17 17:46:06 +02:00 committed by Jan Hubicka
parent 27442c2405
commit 5b79657a11
4 changed files with 23 additions and 3 deletions

View File

@ -1,3 +1,11 @@
2013-09-17 Jan Hubicka <jh@suse.cz>
PR middle-end/58329
* ipa-devirt.c (ipa_devirt): Be ready for symtab_nonoverwritable_alias
to return NULL.
* ipa.c (function_and_variable_visibility): Likewise.
* ipa-profile.c (ipa_profile): Likewise.
2013-09-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR ipa/58398

View File

@ -1098,7 +1098,13 @@ ipa_devirt (void)
cgraph_node_name (likely_target),
likely_target->symbol.order);
if (!symtab_can_be_discarded ((symtab_node) likely_target))
likely_target = cgraph (symtab_nonoverwritable_alias ((symtab_node)likely_target));
{
cgraph_node *alias;
alias = cgraph (symtab_nonoverwritable_alias
((symtab_node)likely_target));
if (alias)
likely_target = alias;
}
nconverted++;
update = true;
cgraph_turn_edge_to_speculative

View File

@ -625,7 +625,13 @@ ipa_profile (void)
of N2. Speculate on the local alias to allow inlining.
*/
if (!symtab_can_be_discarded ((symtab_node) n2))
n2 = cgraph (symtab_nonoverwritable_alias ((symtab_node)n2));
{
cgraph_node *alias;
alias = cgraph (symtab_nonoverwritable_alias
((symtab_node)n2));
if (alias)
n2 = alias;
}
nconverted++;
cgraph_turn_edge_to_speculative
(e, n2,

View File

@ -998,7 +998,7 @@ function_and_variable_visibility (bool whole_program)
{
struct cgraph_node *alias = cgraph (symtab_nonoverwritable_alias ((symtab_node) node));
if (alias != node)
if (alias && alias != node)
{
while (node->callers)
{