diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-02-24 02:43:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-02-24 02:43:21 +0000 |
commit | 1b4d46a696a3b95355575127e263b077fd073d37 (patch) | |
tree | 65dd57db17081941e7c0e9203d4858e26faca2a8 /gcc/go/gofrontend/gogo.cc | |
parent | 32e0b68a4b62cc806ee65524580886cc723382e3 (diff) | |
download | gcc-1b4d46a696a3b95355575127e263b077fd073d37.zip gcc-1b4d46a696a3b95355575127e263b077fd073d37.tar.gz gcc-1b4d46a696a3b95355575127e263b077fd073d37.tar.bz2 |
Don't crash if a result variable redefines a parameter.
From-SVN: r170451
Diffstat (limited to 'gcc/go/gofrontend/gogo.cc')
-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); } } |