diff options
author | Rafael Espindola <espindola@google.com> | 2009-03-10 09:33:29 +0000 |
---|---|---|
committer | Rafael Espindola <espindola@google.com> | 2009-03-10 09:33:29 +0000 |
commit | bb21b226c0bf90f580f90a48e113e54fa42b4717 (patch) | |
tree | b6f63f9820bd5f878f823bae5477bf324fe42875 /gcc | |
parent | edc82a4aed6ee1d48764688cbc1be210465d2ef4 (diff) |
2009-03-10 Rafael Avila de Espindola <espindola@google.com>
* g++.dg/lto/20090309_0.C: New.
* g++.dg/lto/20090309_1.C: New
2009-03-10 Rafael Avila de Espindola <espindola@google.com>
* tree-inline.c (expand_call_inline): Handle the case that DEST
has just been created.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@144740 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog.lto | 5 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog.lto | 5 | ||||
-rw-r--r-- | gcc/tree-inline.c | 7 |
3 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto index fe6fc0ca91f..ff1c6d6f145 100644 --- a/gcc/ChangeLog.lto +++ b/gcc/ChangeLog.lto @@ -1,3 +1,8 @@ +2009-03-10 Rafael Avila de Espindola <espindola@google.com> + + * tree-inline.c (expand_call_inline): Handle the case that DEST + has just been created. + 2009-03-09 Diego Novillo <dnovillo@google.com> * tree.c (free_lang_data_in_type): Remove all variants diff --git a/gcc/testsuite/ChangeLog.lto b/gcc/testsuite/ChangeLog.lto index 89ba0716bda..ba5ffaad8c6 100644 --- a/gcc/testsuite/ChangeLog.lto +++ b/gcc/testsuite/ChangeLog.lto @@ -1,3 +1,8 @@ +2009-03-10 Rafael Avila de Espindola <espindola@google.com> + + * g++.dg/lto/20090309_0.C: New. + * g++.dg/lto/20090309_1.C: New + 2009-03-09 Diego Novillo <dnovillo@google.com> * gcc.c-torture/execute/builtins/strlen-3.c: Fix ODR issue diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 3de698c78f4..432d64a2fc8 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -3133,7 +3133,12 @@ expand_call_inline (basic_block bb, gimple stmt, copy_body_data *id) where previous inlining turned indirect call into direct call by constant propagating arguments. In all other cases we hit a bug (incorrect node sharing is most common reason for missing edges. */ - gcc_assert (dest->needed); + + /* In WPA we do not scan the bodies, so we did not output a node + for this decl if it was only used indirectly. Make sure we mark the + new node as needed. */ + dest->needed = 1; + cgraph_create_edge (id->dst_node, dest, stmt, bb->count, CGRAPH_FREQ_BASE, bb->loop_depth)->inline_failed |