PR middle-end/58477
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 14 Dec 2013 18:28:22 +0000 (18:28 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 14 Dec 2013 18:28:22 +0000 (18:28 +0000)
* 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

gcc/ChangeLog
gcc/cgraphclones.c

index 4c68beb..ab586ff 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-14   Jan Hubicka  <jh@suse.cz>
+
+       PR middle-end/58477
+       * cgraphclones.c (cgraph_clone_edge): Do not resolve speculative edges.
+
 2013-12-14   H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/59492
index 90ef901..80ed170 100644 (file)
@@ -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);