OSDN Git Service

Fix handling of functions with named results that call recover.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Dec 2010 01:22:56 +0000 (01:22 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Dec 2010 01:22:56 +0000 (01:22 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168156 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/go/gofrontend/gogo.cc

index bf197e5..59141fb 100644 (file)
@@ -2628,7 +2628,7 @@ void
 Function::swap_for_recover(Function *x)
 {
   gcc_assert(this->enclosing_ == x->enclosing_);
-  gcc_assert(this->named_results_ == x->named_results_);
+  std::swap(this->named_results_, x->named_results_);
   std::swap(this->closure_var_, x->closure_var_);
   std::swap(this->block_, x->block_);
   gcc_assert(this->location_ == x->location_);