diff options
-rw-r--r-- | gcc/go/gofrontend/gogo.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index b062c54..f1404cc 100644 --- a/gcc/go/gofrontend/gogo.cc +++ b/gcc/go/gofrontend/gogo.cc @@ -2558,7 +2558,8 @@ Function::create_named_result_variables(Gogo* gogo) } Result_variable* result = new Result_variable(p->type(), this, index); Named_object* no = block->bindings()->add_result_variable(name, result); - this->named_results_->push_back(no); + if (no->is_result_variable()) + this->named_results_->push_back(no); } } |