mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-06 02:49:36 +08:00
Don't crash receiving multiple results from void function.
From-SVN: r168157
This commit is contained in:
parent
0cb04e3af7
commit
428f5f5f35
@ -8816,6 +8816,12 @@ Call_result_expression::do_type()
|
|||||||
if (fntype == NULL)
|
if (fntype == NULL)
|
||||||
return Type::make_error_type();
|
return Type::make_error_type();
|
||||||
const Typed_identifier_list* results = fntype->results();
|
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();
|
Typed_identifier_list::const_iterator pr = results->begin();
|
||||||
for (unsigned int i = 0; i < this->index_; ++i)
|
for (unsigned int i = 0; i < this->index_; ++i)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user