aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-02-15 19:41:29 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-02-15 19:41:29 +0000
commitf80129345296759cf3648f32fe9b571dbc799500 (patch)
tree94811ddb512243311914ae5d9fa5cf6cad22508d /gcc/go
parented17fc411c33e37cdbb3d45fc3dc94908d536ae9 (diff)
downloadgcc-f80129345296759cf3648f32fe9b571dbc799500.zip
gcc-f80129345296759cf3648f32fe9b571dbc799500.tar.gz
gcc-f80129345296759cf3648f32fe9b571dbc799500.tar.bz2
Don't crash on defer of type conversion.
From-SVN: r170196
Diffstat (limited to 'gcc/go')
-rw-r--r--gcc/go/gofrontend/statements.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/go/gofrontend/statements.cc b/gcc/go/gofrontend/statements.cc
index bae4be8..268c728 100644
--- a/gcc/go/gofrontend/statements.cc
+++ b/gcc/go/gofrontend/statements.cc
@@ -1778,10 +1778,7 @@ Thunk_statement::do_determine_types()
// pass parameters.
Call_expression* ce = this->call_->call_expression();
if (ce == NULL)
- {
- gcc_assert(this->call_->is_error_expression());
- return;
- }
+ return;
Function_type* fntype = ce->get_function_type();
if (fntype != NULL && !this->is_simple(fntype))
this->struct_type_ = this->build_struct(fntype);
@@ -1795,7 +1792,8 @@ Thunk_statement::do_check_types(Gogo*)
Call_expression* ce = this->call_->call_expression();
if (ce == NULL)
{
- gcc_assert(this->call_->is_error_expression());
+ if (!this->call_->is_error_expression())
+ this->report_error("expected call expression");
return;
}
Function_type* fntype = ce->get_function_type();