From: Ian Lance Taylor Date: Thu, 24 Feb 2011 02:43:21 +0000 (+0000) Subject: Don't crash if a result variable redefines a parameter. X-Git-Tag: upstream/12.2.0~86215 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b4d46a696a3b95355575127e263b077fd073d37;p=platform%2Fupstream%2Fgcc.git Don't crash if a result variable redefines a parameter. From-SVN: r170451 --- diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc index b062c541a69..f1404cc260e 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); } }