| 1 |
// https://issues.dlang.org/show_bug.cgi?id=12776 |
| 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 test12776() |
| 9 |
{ |
| 10 |
alias Vector16s = TypeTuple!( |
| 11 |
void16, byte16, short8, int4, long2, |
| 12 |
ubyte16, ushort8, uint4, ulong2, float4, double2); |
| 13 |
foreach (V; Vector16s) |
| 14 |
{ |
| 15 |
static assert(is(typeof( V .init) == V )); |
| 16 |
static assert(is(typeof( const(V).init) == const(V))); |
| 17 |
static assert(is(typeof( inout( V).init) == inout( V))); |
| 18 |
static assert(is(typeof( inout(const V).init) == inout(const V))); |
| 19 |
static assert(is(typeof(shared( V).init) == shared( V))); |
| 20 |
static assert(is(typeof(shared( const V).init) == shared( const V))); |
| 21 |
static assert(is(typeof(shared(inout V).init) == shared(inout V))); |
| 22 |
static assert(is(typeof(shared(inout const V).init) == shared(inout const V))); |
| 23 |
static assert(is(typeof( immutable(V).init) == immutable(V))); |
| 24 |
} |
| 25 |
} |