Commit 428f5f5f by Ian Lance Taylor

Don't crash receiving multiple results from void function.

From-SVN: r168157
parent 0cb04e3a
......@@ -8816,6 +8816,12 @@ Call_result_expression::do_type()
if (fntype == NULL)
return Type::make_error_type();
const Typed_identifier_list* results = fntype->results();
if (results == NULL)
{
this->report_error(_("number of results does not match "
"number of values"));
return Type::make_error_type();
}
Typed_identifier_list::const_iterator pr = results->begin();
for (unsigned int i = 0; i < this->index_; ++i)
{
......
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