re PR c++/58477 (ice in cgraph_speculative_call_info)
authorJan Hubicka <jh@suse.cz>
Sat, 14 Dec 2013 18:28:22 +0000 (19:28 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 14 Dec 2013 18:28:22 +0000 (18:28 +0000)
PR middle-end/58477
* cgraphclones.c (cgraph_clone_edge): Do not resolve speculative edges.

From-SVN: r205991

gcc/ChangeLog
gcc/cgraphclones.c

index 4c68beb1efc3b24528b918a6a7fb3370f2309bad..ab586ff6483f4b7cf012e81b135a42cb7171e299 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 90ef90183b4616d6ea45401ba17000a185ed6521..80ed17047d79f8462a03114bdbdc0687fff5a518 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);