Debian Codegraph @

gcc/testsuite/gdc.dg/simd13841.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=13841
2 // { dg-additional-options "-mavx" { target avx_runtime } }
3 // { dg-do compile { target { avx_runtime || vect_sizes_16B_8B } } }
4 import core.simd;
5
6 alias TypeTuple(T...) = T;
7
8 void test13841()
9 {
10 alias Vector16s = TypeTuple!(
11 void16, byte16, short8, int4, long2,
12 ubyte16, ushort8, uint4, ulong2, float4, double2);
13 foreach (V1; Vector16s)
14 {
15 foreach (V2; Vector16s)
16 {
17 V1 v1 = void;
18 V2 v2 = void;
19 static if (is(V1 == V2))
20 {
21 static assert( is(typeof(true ? v1 : v2) == V1));
22 }
23 else
24 {
25 static assert(!is(typeof(true ? v1 : v2)));
26 }
27 }
28 }
29 }