aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2009-12-10 21:50:47 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2009-12-10 20:50:47 +0000
commit47cb0d7da16c57888fdc04437530d86f33ee3c1b (patch)
tree4b7897c70e32ed3a7ade0ed23cc48ffbcd023f09 /gcc/cgraphunit.c
parent604df1167c464da3710e28270e6561d427df0444 (diff)
downloadgcc-47cb0d7da16c57888fdc04437530d86f33ee3c1b.zip
gcc-47cb0d7da16c57888fdc04437530d86f33ee3c1b.tar.gz
gcc-47cb0d7da16c57888fdc04437530d86f33ee3c1b.tar.bz2
re PR middle-end/42228 (verify_cgraph_node failed:node has wrong clone_of)
PR middle-end/42228 PR middle-end/42110 * cgraph.c (cgraph_create_edge_including_clones): Add old_stmt parameter; update edge if it already exists. (cgraph_remove_node): Handle correctly cases where we are removing node having clones. * cgraph.h (cgraph_create_edge_including_clones): Declare. (verify_cgraph_node): Add missing error_found = true code. (cgraph_materialize_all_clones): Remove call edges of dead nodes. * ipa.c (cgraph_remove_unreachable_nodes): Correctly look for master clone; fix double linked list removal. * tree-inline.c (copy_bb): Update cgraph_create_edge_including_clones call; fix frequency of newly created edge. * g++.dg/torture/pr42110.C: new file. From-SVN: r155140
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 345fb67..58bdd85 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -749,6 +749,7 @@ verify_cgraph_node (struct cgraph_node *node)
{
error ("edge points to same body alias:");
debug_tree (e->callee->decl);
+ error_found = true;
}
else if (!clone_of_p (cgraph_node (decl), e->callee)
&& !e->callee->global.inlined_to)
@@ -757,6 +758,7 @@ verify_cgraph_node (struct cgraph_node *node)
debug_tree (e->callee->decl);
fprintf (stderr," Instead of:");
debug_tree (decl);
+ error_found = true;
}
e->aux = (void *)1;
}
@@ -2248,6 +2250,9 @@ cgraph_materialize_all_clones (void)
}
}
}
+ for (node = cgraph_nodes; node; node = node->next)
+ if (!node->analyzed && node->callees)
+ cgraph_node_remove_callees (node);
if (cgraph_dump_file)
fprintf (cgraph_dump_file, "Updating call sites\n");
for (node = cgraph_nodes; node; node = node->next)