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/cgraph.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/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index fe1126b..53475d1 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -701,8 +701,9 @@ cgraph_create_edge_including_clones (struct cgraph_node *orig, struct cgraph_nod { struct cgraph_node *node; - cgraph_create_edge (orig, callee, stmt, count, freq, loop_depth)->inline_failed = - reason; + if (!cgraph_edge (orig, stmt)) + cgraph_create_edge (orig, callee, stmt, + count, freq, loop_depth)->inline_failed = reason; if (orig->clones) for (node = orig->clones; node != orig;) |