Commit f8012934 by Ian Lance Taylor

Don't crash on defer of type conversion.

From-SVN: r170196
parent ed17fc41
...@@ -1778,10 +1778,7 @@ Thunk_statement::do_determine_types() ...@@ -1778,10 +1778,7 @@ Thunk_statement::do_determine_types()
// pass parameters. // pass parameters.
Call_expression* ce = this->call_->call_expression(); Call_expression* ce = this->call_->call_expression();
if (ce == NULL) if (ce == NULL)
{ return;
gcc_assert(this->call_->is_error_expression());
return;
}
Function_type* fntype = ce->get_function_type(); Function_type* fntype = ce->get_function_type();
if (fntype != NULL && !this->is_simple(fntype)) if (fntype != NULL && !this->is_simple(fntype))
this->struct_type_ = this->build_struct(fntype); this->struct_type_ = this->build_struct(fntype);
...@@ -1795,7 +1792,8 @@ Thunk_statement::do_check_types(Gogo*) ...@@ -1795,7 +1792,8 @@ Thunk_statement::do_check_types(Gogo*)
Call_expression* ce = this->call_->call_expression(); Call_expression* ce = this->call_->call_expression();
if (ce == NULL) if (ce == NULL)
{ {
gcc_assert(this->call_->is_error_expression()); if (!this->call_->is_error_expression())
this->report_error("expected call expression");
return; return;
} }
Function_type* fntype = ce->get_function_type(); Function_type* fntype = ce->get_function_type();
......
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