aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-05-09 22:10:37 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2009-05-09 20:10:37 +0000
commit9a23acef1da9089539605d8e6a8a1b04d05af542 (patch)
tree43b5d9b7a4d59a1f00ee1125d664d5a5f6f6748b /gcc/cgraphunit.c
parentd563610d814b5ebd2942b4c7b61ca57110d279ca (diff)
downloadgcc-9a23acef1da9089539605d8e6a8a1b04d05af542.zip
gcc-9a23acef1da9089539605d8e6a8a1b04d05af542.tar.gz
gcc-9a23acef1da9089539605d8e6a8a1b04d05af542.tar.bz2
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
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 9366ebe..e88d00d 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);
}