diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-01 11:22:58 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-01 11:22:58 +0000 |
commit | 2dd60f2dcb7a65466fcf3867532c55956585ebc4 (patch) | |
tree | 4e9e2ea67e93ec852a57145cf66b4ba2ad32d04b /gcc/cgraphclones.c | |
parent | 2df2285de1d8ba686f26f5291f5e3114ad62631f (diff) | |
download | gcc-2dd60f2dcb7a65466fcf3867532c55956585ebc4.tar.gz |
2014-04-01 Basile Starynkevitch <basile@starynkevitch.net>
{{merge using svnmerge.py with trunk GCC 4.9 svn
rev.208985...}}
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@208986 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphclones.c')
-rw-r--r-- | gcc/cgraphclones.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index ca69033ddde..b2eb8ab5ce9 100644 --- a/gcc/cgraphclones.c +++ b/gcc/cgraphclones.c @@ -238,8 +238,12 @@ cgraph_clone_node (struct cgraph_node *n, tree decl, gcov_type count, int freq, FOR_EACH_VEC_ELT (redirect_callers, i, e) { /* Redirect calls to the old version node to point to its new - version. */ - cgraph_redirect_edge_callee (e, new_node); + version. The only exception is when the edge was proved to + be unreachable during the clonning procedure. */ + if (!e->callee + || DECL_BUILT_IN_CLASS (e->callee->decl) != BUILT_IN_NORMAL + || DECL_FUNCTION_CODE (e->callee->decl) != BUILT_IN_UNREACHABLE) + cgraph_redirect_edge_callee (e, new_node); } |