aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/statements.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go/gofrontend/statements.cc')
-rw-r--r--gcc/go/gofrontend/statements.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/go/gofrontend/statements.cc b/gcc/go/gofrontend/statements.cc
index 880d5c8..ca1ad07 100644
--- a/gcc/go/gofrontend/statements.cc
+++ b/gcc/go/gofrontend/statements.cc
@@ -569,7 +569,10 @@ void
Assignment_statement::do_determine_types()
{
this->lhs_->determine_type_no_context();
- Type_context context(this->lhs_->type(), false);
+ Type* rhs_context_type = this->lhs_->type();
+ if (rhs_context_type->is_sink_type())
+ rhs_context_type = NULL;
+ Type_context context(rhs_context_type, false);
this->rhs_->determine_type(&context);
}