aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2020-09-04 22:54:22 +0200
committerIain Buclaw <ibuclaw@gdcproject.org>2020-09-04 23:01:46 +0200
commitf8eabd47ac5335ebab0d83ff61fb680a46888be8 (patch)
tree4fb1eb8e402c83c61978be708eceb58d78bba9a0 /gcc/d/expr.cc
parentf923c40f9baba19e58f65afa7e5572f08cee93ff (diff)
downloadgcc-f8eabd47ac5335ebab0d83ff61fb680a46888be8.zip
gcc-f8eabd47ac5335ebab0d83ff61fb680a46888be8.tar.gz
gcc-f8eabd47ac5335ebab0d83ff61fb680a46888be8.tar.bz2
d: Fix ICE in create_tmp_var, at gimple-expr.c:482
Array concatenate expressions were creating more SAVE_EXPRs than what was necessary. The internal error itself was the result of a forced temporary being made on a TREE_ADDRESSABLE type. gcc/d/ChangeLog: PR d/96924 * expr.cc (ExprVisitor::visit (CatAssignExp *)): Don't force temporaries needlessly. gcc/testsuite/ChangeLog: PR d/96924 * gdc.dg/simd13927b.d: Removed. * gdc.dg/pr96924.d: New test.
Diffstat (limited to 'gcc/d/expr.cc')
-rw-r--r--gcc/d/expr.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc
index 2b13615..79f212c 100644
--- a/gcc/d/expr.cc
+++ b/gcc/d/expr.cc
@@ -875,7 +875,6 @@ public:
tree offexp = d_array_length (result);
offexp = build2 (MINUS_EXPR, TREE_TYPE (offexp),
offexp, size_one_node);
- offexp = d_save_expr (offexp);
tree ptrexp = d_array_ptr (result);
ptrexp = void_okay_p (ptrexp);
@@ -885,9 +884,7 @@ public:
tree t2 = build_expr (e->e2);
tree expr = stabilize_expr (&t2);
- t2 = d_save_expr (t2);
result = modify_expr (build_deref (ptrexp), t2);
- result = compound_expr (t2, result);
this->result_ = compound_expr (expr, result);
}