diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-02 15:39:43 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-06-02 15:39:43 +0000 |
commit | 1f449108dbecc97af770d00f70bf5f8ed35464a0 (patch) | |
tree | 111ab9b5c50fddbf3f2bb8c2a8a8ccd30603cdc5 /gcc/cgraphunit.c | |
parent | 7f754bbe21f0eee7f03cffc4e205014cefadb035 (diff) | |
download | gcc-1f449108dbecc97af770d00f70bf5f8ed35464a0.tar.gz |
PR middle-end/44295
* cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Do not
create new cgraph node to check callee.
* testsuite/g++.dg/torture/pr44295.C: Neww testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160159 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r-- | gcc/cgraphunit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 47686a4212a..54752ed54c1 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -2346,13 +2346,19 @@ cgraph_redirect_edge_call_stmt_to_callee (struct cgraph_edge *e) tree decl = gimple_call_fndecl (e->call_stmt); gimple new_stmt; gimple_stmt_iterator gsi; +#ifdef ENABLE_CHECKING + struct cgraph_node *node; +#endif if (!decl || decl == e->callee->decl /* Don't update call from same body alias to the real function. */ || cgraph_get_node (decl) == cgraph_get_node (e->callee->decl)) return e->call_stmt; - gcc_assert (!cgraph_node (decl)->clone.combined_args_to_skip); +#ifdef ENABLE_CHECKING + node = cgraph_get_node (decl); + gcc_assert (!node || !node->clone.combined_args_to_skip); +#endif if (cgraph_dump_file) { |