diff options
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 140d7781c84..9f86204ecff 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -5326,7 +5326,7 @@ tree_can_inline_p (struct cgraph_edge *e) return false; } #endif - tree caller, callee, lhs; + tree caller, callee; caller = e->caller->decl; callee = e->callee->decl; @@ -5353,13 +5353,7 @@ tree_can_inline_p (struct cgraph_edge *e) /* Do not inline calls where we cannot triviall work around mismatches in argument or return types. */ if (e->call_stmt - && ((DECL_RESULT (callee) - && !DECL_BY_REFERENCE (DECL_RESULT (callee)) - && (lhs = gimple_call_lhs (e->call_stmt)) != NULL_TREE - && !useless_type_conversion_p (TREE_TYPE (DECL_RESULT (callee)), - TREE_TYPE (lhs)) - && !fold_convertible_p (TREE_TYPE (DECL_RESULT (callee)), lhs)) - || !gimple_check_call_args (e->call_stmt))) + && !gimple_check_call_matching_types (e->call_stmt, callee)) { e->inline_failed = CIF_MISMATCHED_ARGUMENTS; if (e->call_stmt) |