aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c7
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);
}