From 8f475d87e726310c9491f6938f132cbc013f8297 Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Mon, 21 Dec 2020 00:54:50 -0800 Subject: [PATCH] fix Issue 19788 - compiler crash on slicing a enum typed as vector --- test/runnable/testxmm.d | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/runnable/testxmm.d b/test/runnable/testxmm.d index 544bb78c126a..890ec8820ec6 100644 --- a/test/runnable/testxmm.d +++ b/test/runnable/testxmm.d @@ -2152,6 +2152,15 @@ void test21364() foo21364(1, x, 2, 3, 4, 5, 6, 7, 8, 9, 10); } +/*****************************************/ +// https://issues.dlang.org/show_bug.cgi?id=19788 + +void test19788() +{ + enum v = __vector(float[4]).init; + const(float)[] a = v[]; +} + /*****************************************/ int main() @@ -2199,6 +2208,7 @@ int main() test7(); test20981(); test21364(); + test19788(); return 0; }