diff options
author | Jan Hubicka <jh@suse.cz> | 2009-06-08 19:17:52 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2009-06-08 17:17:52 +0000 |
commit | 6ce2002b031c923f028fc53cc1ba802483417113 (patch) | |
tree | 7dfa5d5d22a7a192d98aea40e41add3c292cc255 /gcc/tree-inline.c | |
parent | 491e6ad11cf6f4e3d52de07bd9892924f8dd6b51 (diff) | |
download | gcc-6ce2002b031c923f028fc53cc1ba802483417113.zip gcc-6ce2002b031c923f028fc53cc1ba802483417113.tar.gz gcc-6ce2002b031c923f028fc53cc1ba802483417113.tar.bz2 |
re PR middle-end/40102 (Revision 147294 caused ICE: verify_cgraph_node)
PR middle-end/40102
* cgraph.c (cgraph_create_edge_including_clones): Also asume that the
original node might've been modified.
* tree-inline.c (copy_bb): Do not assume that all clones are the same.
PR middle-end/40102
* g++.dg/torture/pr40102.C: New testcase.
From-SVN: r148287
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index f79424d..18c2c03 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1508,11 +1508,14 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale, gcc_unreachable (); } + edge = cgraph_edge (id->src_node, orig_stmt); /* Constant propagation on argument done during inlining may create new direct call. Produce an edge for it. */ - if (!edge && is_gimple_call (stmt) - && (fn = gimple_call_fndecl (stmt)) != NULL - && !cgraph_edge (id->dst_node, stmt)) + if ((!edge + || (edge->indirect_call + && id->transform_call_graph_edges == CB_CGE_MOVE_CLONES)) + && is_gimple_call (stmt) + && (fn = gimple_call_fndecl (stmt)) != NULL) { struct cgraph_node *dest = cgraph_node (fn); |