diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6f2b9ea8fd..775d562871e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-09-25 Jan Hubicka + + * cgraph.c (cgraph_resolve_speculation): Use semantical equivalency + test. + 2013-09-25 Marek Polacek PR sanitizer/58420 diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 722f8ca97e9..e84ce948d90 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -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) {