summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-08 17:17:52 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2009-06-08 17:17:52 +0000
commitb437daf41754afff274e689c4eddeb291a0e679e (patch)
tree7dfa5d5d22a7a192d98aea40e41add3c292cc255 /gcc/cgraph.c
parent7302546d02e4127d26720b6cf8c1ccf5a4216971 (diff)
downloadgcc-b437daf41754afff274e689c4eddeb291a0e679e.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148287 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index fe1126bca91..53475d112fc 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;)