gcc/testsuite/gdc.dg/torture/simd23218.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=23218 |
| 2 | // { dg-additional-options "-mavx" { target avx_runtime } } |
| 3 | // { dg-do run { target { avx_runtime || vect_sizes_16B_8B } } } |
| 4 | // { dg-skip-if "needs gcc/config.d" { ! d_runtime } } |
| 5 | |
| 6 | __vector(int[4]) convtest(int[4] a) |
| 7 | { |
| 8 | return cast(__vector(int[4]))a; |
| 9 | } |
| 10 | |
| 11 | void main() |
| 12 | { |
| 13 | static assert(convtest([1,2,3,4])[0] == 1); |
| 14 | assert(convtest([1,2,3,4])[0] == 1); |
| 15 | } |