From: Jan Hubicka Date: Sat, 14 Dec 2013 18:28:22 +0000 (+0100) Subject: re PR c++/58477 (ice in cgraph_speculative_call_info) X-Git-Tag: releases/gcc-4.9.0~2076 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e57872ee8ed5a74c52a208355a2585e8670c5f5a;p=thirdparty%2Fgcc.git re PR c++/58477 (ice in cgraph_speculative_call_info) PR middle-end/58477 * cgraphclones.c (cgraph_clone_edge): Do not resolve speculative edges. From-SVN: r205991 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c68beb1efc3..ab586ff6483f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-12-14 Jan Hubicka + + PR middle-end/58477 + * cgraphclones.c (cgraph_clone_edge): Do not resolve speculative edges. + 2013-12-14 H.J. Lu PR target/59492 diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index 90ef90183b46..80ed17047d79 100644 --- a/gcc/cgraphclones.c +++ b/gcc/cgraphclones.c @@ -123,7 +123,10 @@ cgraph_clone_edge (struct cgraph_edge *e, struct cgraph_node *n, { tree decl; - if (call_stmt && (decl = gimple_call_fndecl (call_stmt))) + if (call_stmt && (decl = gimple_call_fndecl (call_stmt)) + /* When the call is speculative, we need to resolve it + via cgraph_resolve_speculation and not here. */ + && !e->speculative) { struct cgraph_node *callee = cgraph_get_node (decl); gcc_checking_assert (callee);