Message ID | mcrmxld3twf.fsf@google.com |
---|---|
State | New |
Headers | show |
diff -r a43381c7d981 go/gogo-tree.cc --- a/go/gogo-tree.cc Wed Mar 02 16:40:45 2011 -0800 +++ b/go/gogo-tree.cc Wed Mar 02 16:45:21 2011 -0800 @@ -1786,8 +1786,14 @@ // defer statements, the result variables may be unnamed. bool is_named = !results->front().name().empty(); if (is_named) - gcc_assert(this->named_results_ != NULL - && this->named_results_->size() == results->size()); + { + gcc_assert(this->named_results_ != NULL); + if (this->named_results_->size() != results->size()) + { + gcc_assert(saw_errors()); + return error_mark_node; + } + } tree retval; if (results->size() == 1)