aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/wb.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/go/gofrontend/wb.cc')
-rw-r--r--gcc/go/gofrontend/wb.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/go/gofrontend/wb.cc b/gcc/go/gofrontend/wb.cc
index ac1f0a1..104c5db 100644
--- a/gcc/go/gofrontend/wb.cc
+++ b/gcc/go/gofrontend/wb.cc
@@ -883,7 +883,7 @@ Gogo::assign_with_write_barrier(Function* function, Block* enclosing,
Type::COMPARE_ERRORS | Type::COMPARE_TAGS,
NULL)
&& rhs->type()->interface_type() != NULL
- && !rhs->is_variable())
+ && !rhs->is_multi_eval_safe())
{
// May need a temporary for interface conversion.
Temporary_statement* temp = Statement::make_temporary(NULL, rhs, loc);
@@ -892,7 +892,7 @@ Gogo::assign_with_write_barrier(Function* function, Block* enclosing,
}
rhs = Expression::convert_for_assignment(this, type, rhs, loc);
Temporary_statement* rhs_temp = NULL;
- if (!rhs->is_variable() && !rhs->is_constant())
+ if (!rhs->is_multi_eval_safe())
{
rhs_temp = Statement::make_temporary(NULL, rhs, loc);
inserter->insert(rhs_temp);