Commit 4955456b by Ian Lance Taylor

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

From-SVN: r167886
parent 183d062a
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment