diff options
author | Richard Guenther <rguenther@suse.de> | 2011-11-09 13:43:02 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-11-09 13:43:02 +0000 |
commit | 03cb5f3988646680362082c19ddcba7c534d6a83 (patch) | |
tree | 524fa049f2662f6ef1b7960ace71e77bbaa25b55 /gcc/gimple-streamer-in.c | |
parent | c4ac6e9400db96df9e82434acc513060853ed2e1 (diff) | |
download | gcc-03cb5f3988646680362082c19ddcba7c534d6a83.zip gcc-03cb5f3988646680362082c19ddcba7c534d6a83.tar.gz gcc-03cb5f3988646680362082c19ddcba7c534d6a83.tar.bz2 |
re PR tree-optimization/51039 (ICE: in estimate_function_body_sizes, at ipa-inline-analysis.c:1977 with -finline-small-functions -fno-ipa-pure-const and passing incompatible function ptr)
2011-11-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/51039
* tree-cfg.c (verify_gimple_call): Verify that
gimple_call_cannot_inline_p is returning a conservative
correct result according to gimple_check_call_matching_types.
* ipa-inline-analysis.c (estimate_function_body_sizes): Remove
code dealing with un-inlinablility.
* gimple-streamer-in.c (input_gimple_stmt): Update the
non-inlinable flag.
* gcc.dg/pr51039.c: New testcase.
From-SVN: r181205
Diffstat (limited to 'gcc/gimple-streamer-in.c')
-rw-r--r-- | gcc/gimple-streamer-in.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/gimple-streamer-in.c b/gcc/gimple-streamer-in.c index fc6ceb4..862c5b0 100644 --- a/gcc/gimple-streamer-in.c +++ b/gcc/gimple-streamer-in.c @@ -219,11 +219,18 @@ input_gimple_stmt (struct lto_input_block *ib, struct data_in *data_in, } if (is_gimple_call (stmt)) { + tree fndecl; if (gimple_call_internal_p (stmt)) gimple_call_set_internal_fn (stmt, streamer_read_enum (ib, internal_fn, IFN_LAST)); else gimple_call_set_fntype (stmt, stream_read_tree (ib, data_in)); + /* Update the non-inlinable flag conservatively. */ + fndecl = gimple_call_fndecl (stmt); + if (fndecl + && !gimple_call_cannot_inline_p (stmt) + && !gimple_check_call_matching_types (stmt, fndecl)) + gimple_call_set_cannot_inline (stmt, true); } break; |