From: Jan Hubicka Date: Sat, 9 May 2009 20:10:37 +0000 (+0200) Subject: re PR middle-end/40080 (error: missing callgraph edge for call stmt) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9a23acef1da9089539605d8e6a8a1b04d05af542;p=gcc.git re PR middle-end/40080 (error: missing callgraph edge for call stmt) PR middle-end/40080 * cgraphunit.c (cgraph_materialize_all_clones): Do not redirect indirect calls; verify cgraph afterwards. From-SVN: r147320 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6de79afa97a..73de4f377f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-05-09 Jan Hubicka + + PR middle-end/40080 + * cgraphunit.c (cgraph_materialize_all_clones): Do not redirect + indirect calls; verify cgraph afterwards. + 2009-05-09 Jan Hubicka PR bootstrap/40082 diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 9366ebe2869..e88d00d0dfb 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1762,7 +1762,12 @@ cgraph_materialize_all_clones (void) for (e = node->callees; e; e = e->next_callee) { tree decl = gimple_call_fndecl (e->call_stmt); - if (decl != e->callee->decl) + /* When function gets inlined, indirect inlining might've invented + new edge for orginally indirect stmt. Since we are not + preserving clones in the original form, we must not update here + since other inline clones don't need to contain call to the same + call. Inliner will do the substitution for us later. */ + if (decl && decl != e->callee->decl) { gimple new_stmt; gimple_stmt_iterator gsi; @@ -1808,6 +1813,9 @@ cgraph_materialize_all_clones (void) verify_cgraph_node (node); #endif } +#ifdef ENABLE_CHECKING + verify_cgraph (); +#endif cgraph_remove_unreachable_nodes (false, cgraph_dump_file); }