cgraph.c (cgraph_resolve_speculation): Use semantical equivalency test.

* cgraph.c (cgraph_resolve_speculation): Use semantical equivalency
	test.

From-SVN: r202888
This commit is contained in:
Jan Hubicka 2013-09-25 11:48:55 +02:00 committed by Jan Hubicka
parent d70b0f1f22
commit 123485ca22
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-09-25 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_resolve_speculation): Use semantical equivalency
test.
2013-09-25 Marek Polacek <polacek@redhat.com>
PR sanitizer/58420

View File

@ -1188,7 +1188,9 @@ cgraph_resolve_speculation (struct cgraph_edge *edge, tree callee_decl)
gcc_assert (edge->speculative);
cgraph_speculative_call_info (edge, e2, edge, ref);
if (ref->referred->symbol.decl != callee_decl)
if (!callee_decl
|| !symtab_semantically_equivalent_p ((symtab_node) ref->referred,
symtab_get_node (callee_decl)))
{
if (dump_file)
{