aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/expr.cc')
-rw-r--r--gcc/d/expr.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc
index 29f114a..ef4ea60 100644
--- a/gcc/d/expr.cc
+++ b/gcc/d/expr.cc
@@ -972,8 +972,7 @@ public:
Declaration *decl = e->e1->isVarExp ()->var;
if (decl->storage_class & (STCout | STCref))
{
- tree t2 = convert_for_assignment (build_expr (e->e2),
- e->e2->type, e->e1->type);
+ tree t2 = convert_for_assignment (e->e2, e->e1->type);
tree t1 = build_expr (e->e1);
/* Want reference to lhs, not indirect ref. */
t1 = TREE_OPERAND (t1, 0);
@@ -993,8 +992,7 @@ public:
if (tb1->ty == TY::Tstruct)
{
tree t1 = build_expr (e->e1);
- tree t2 = convert_for_assignment (build_expr (e->e2, false, true),
- e->e2->type, e->e1->type);
+ tree t2 = convert_for_assignment (e->e2, e->e1->type, true);
StructDeclaration *sd = tb1->isTypeStruct ()->sym;
/* Look for struct = 0. */
@@ -1073,8 +1071,7 @@ public:
|| (e->op == EXP::blit || e->e1->type->size () == 0))
{
tree t1 = build_expr (e->e1);
- tree t2 = convert_for_assignment (build_expr (e->e2),
- e->e2->type, e->e1->type);
+ tree t2 = convert_for_assignment (e->e2, e->e1->type);
this->result_ = build_assign (modifycode, t1, t2);
return;
@@ -1088,8 +1085,7 @@ public:
/* Simple assignment. */
tree t1 = build_expr (e->e1);
- tree t2 = convert_for_assignment (build_expr (e->e2),
- e->e2->type, e->e1->type);
+ tree t2 = convert_for_assignment (e->e2, e->e1->type);
this->result_ = build_assign (modifycode, t1, t2);
}