projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32e0b68
)
Don't crash if a result variable redefines a parameter.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 24 Feb 2011 02:43:21 +0000
(
02:43
+0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Thu, 24 Feb 2011 02:43:21 +0000
(
02:43
+0000)
From-SVN: r170451
gcc/go/gofrontend/gogo.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/gogo.cc
b/gcc/go/gofrontend/gogo.cc
index b062c541a698706519fbf1a1944b29abf4980814..f1404cc260ef32ba1fc3bfd6b301ad9c571a7dc4 100644
(file)
--- 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);
}
}