summaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-10 13:24:27 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-10 13:24:27 +0000
commit759a30b2ba2287a83e867f8fd905e51b498ce220 (patch)
treec8e1bb5162500d3e7ff842010e045a84a72f504d /gcc/tree-inline.c
parent975d6522655fc639fb2d7bbe9c1fa282647c67c5 (diff)
downloadgcc-759a30b2ba2287a83e867f8fd905e51b498ce220.tar.gz
Check e->call_stmt before calling gimple_call_set_cannot_inline.
2011-01-10 H.J. Lu <hongjiu.lu@intel.com> PR lto/46760 * tree-inline.c (tree_can_inline_p): Check e->call_stmt before calling gimple_call_set_cannot_inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168631 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 8725ca41953..6c76fe3b994 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -5380,7 +5380,8 @@ tree_can_inline_p (struct cgraph_edge *e)
if (inline_forbidden_into_p (caller, callee))
{
e->inline_failed = CIF_UNSPECIFIED;
- gimple_call_set_cannot_inline (e->call_stmt, true);
+ if (e->call_stmt)
+ gimple_call_set_cannot_inline (e->call_stmt, true);
return false;
}
@@ -5388,7 +5389,8 @@ tree_can_inline_p (struct cgraph_edge *e)
if (!targetm.target_option.can_inline_p (caller, callee))
{
e->inline_failed = CIF_TARGET_OPTION_MISMATCH;
- gimple_call_set_cannot_inline (e->call_stmt, true);
+ if (e->call_stmt)
+ gimple_call_set_cannot_inline (e->call_stmt, true);
e->call_stmt_cannot_inline_p = true;
return false;
}
@@ -5405,7 +5407,8 @@ tree_can_inline_p (struct cgraph_edge *e)
|| !gimple_check_call_args (e->call_stmt)))
{
e->inline_failed = CIF_MISMATCHED_ARGUMENTS;
- gimple_call_set_cannot_inline (e->call_stmt, true);
+ if (e->call_stmt)
+ gimple_call_set_cannot_inline (e->call_stmt, true);
e->call_stmt_cannot_inline_p = true;
return false;
}