aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-03-12 23:10:49 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-03-12 23:10:49 +0000
commitb9da0278667b43843b750a1ad35a9d6dbc1d1b54 (patch)
tree959bad96bf54189520e6ba013b1e28b19b0285bd /gcc/d/expr.cc
parent035f5b9e0b9fd181aea5d228ddfd91a5a7161dcf (diff)
downloadgcc-b9da0278667b43843b750a1ad35a9d6dbc1d1b54.zip
gcc-b9da0278667b43843b750a1ad35a9d6dbc1d1b54.tar.gz
gcc-b9da0278667b43843b750a1ad35a9d6dbc1d1b54.tar.bz2
d/dmd: Merge upstream dmd 19b1454b5
Backports fixes for many ICEs that occurred when using the vector .array property in both CTFE and code generation passes. Fixes https://gcc.gnu.org/PR88957 Reviewed-on: https://github.com/dlang/dmd/pull/9438 gcc/d/ChangeLog: 2019-03-13 Iain Buclaw <ibuclaw@gdcproject.org> PR d/88957 * expr.cc (ExprVisitor::visit(VectorArrayExp)): New override. gcc/testsuite/ChangeLog: 2019-03-13 Iain Buclaw <ibuclaw@gdcproject.org> PR d/88957 * gdc.dg/pr88957.d: New test. * gdc.dg/simd.d: Add new vector tests. From-SVN: r269627
Diffstat (limited to 'gcc/d/expr.cc')
-rw-r--r--gcc/d/expr.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc
index 4bfdde5..acf81a6 100644
--- a/gcc/d/expr.cc
+++ b/gcc/d/expr.cc
@@ -2992,6 +2992,14 @@ public:
}
}
+ /* Build a static array representation of a vector expression. */
+
+ void visit (VectorArrayExp *e)
+ {
+ this->result_ = convert_expr (build_expr (e->e1, this->constp_),
+ e->e1->type, e->type);
+ }
+
/* Build a static class literal, return its reference. */
void visit (ClassReferenceExp *e)