diff options
author | Richard Guenther <rguenther@suse.de> | 2011-11-08 15:16:22 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-11-08 15:16:22 +0000 |
commit | f2906a8e9e0ed8aba6a7e39a1986f785e9d467f1 (patch) | |
tree | c00e0356ac03d362aa0c47b542073da126813776 /gcc/cgraph.c | |
parent | a59526334d3f36a43f94cdd29ac661eb59260bc6 (diff) | |
download | gcc-f2906a8e9e0ed8aba6a7e39a1986f785e9d467f1.zip gcc-f2906a8e9e0ed8aba6a7e39a1986f785e9d467f1.tar.gz gcc-f2906a8e9e0ed8aba6a7e39a1986f785e9d467f1.tar.bz2 |
re PR tree-optimization/51012 (ICE: in fold_convert_loc, at fold-const.c:1897 with -fno-early-inlining and passing incompatible function ptr)
2011-11-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/51012
* ipa-prop.c (update_indirect_edges_after_inlining): Fixup
non-inlinable state.
* cgraph.c (cgraph_make_edge_direct): Likewise.
* gcc.dg/pr51012-1.c: New testcase.
* gcc.dg/pr51012-2.c: Likewise.
From-SVN: r181166
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index 2d226d4..44a950c 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -1184,6 +1184,13 @@ cgraph_make_edge_direct (struct cgraph_edge *edge, struct cgraph_node *callee) /* Insert to callers list of the new callee. */ cgraph_set_edge_callee (edge, callee); + if (edge->call_stmt + && !gimple_check_call_matching_types (edge->call_stmt, callee->decl)) + { + gimple_call_set_cannot_inline (edge->call_stmt, true); + edge->call_stmt_cannot_inline_p = true; + } + /* We need to re-determine the inlining status of the edge. */ initialize_inline_failed (edge); } |