summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/runnable/test17337.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/runnable/test17337.d')
-rw-r--r--gcc/testsuite/gdc.test/runnable/test17337.d23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/runnable/test17337.d b/gcc/testsuite/gdc.test/runnable/test17337.d
new file mode 100644
index 00000000000..f817eb7d2e8
--- /dev/null
+++ b/gcc/testsuite/gdc.test/runnable/test17337.d
@@ -0,0 +1,23 @@
+// REQUIRED_ARGS: -mcpu=native
+
+static if (__traits(compiles, __vector(ubyte[16])))
+{
+ alias ubyte16 = __vector(ubyte[16]);
+
+ ubyte16 bug(ubyte val)
+ {
+ immutable ubyte16 a = 0, b = val;
+ return b;
+ }
+
+ void main()
+ {
+ bug(0);
+ }
+}
+else
+{
+ void main()
+ {
+ }
+}