diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-14 18:28:22 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-14 18:28:22 +0000 |
commit | 9ccaed8678c508558994428c28b433db1cc4343d (patch) | |
tree | d1f60e9539e3328cda6ef52af8af6095c5e5362f /gcc/cgraphclones.c | |
parent | 73ee5dca233a3f6c5de125f188620efb202576e7 (diff) | |
download | gcc-9ccaed8678c508558994428c28b433db1cc4343d.tar.gz |
PR middle-end/58477
* cgraphclones.c (cgraph_clone_edge): Do not resolve speculative edges.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205991 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphclones.c')
-rw-r--r-- | gcc/cgraphclones.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index 90ef90183b4..80ed17047d7 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); |