Don't crash with go or defer of bad call.

From-SVN: r167886
This commit is contained in:
Ian Lance Taylor 2010-12-16 00:15:16 +00:00
parent 183d062a77
commit 4955456b2d

View File

@ -1812,7 +1812,13 @@ Thunk_statement::simplify_statement(Gogo* gogo, Block* block)
Call_expression* ce = this->call_->call_expression();
Function_type* fntype = ce->get_function_type();
if (fntype == NULL || this->is_simple(fntype))
if (fntype == NULL)
{
gcc_assert(saw_errors());
this->set_is_error();
return false;
}
if (this->is_simple(fntype))
return false;
Expression* fn = ce->fn();