gcc/testsuite/gdc.dg/simd19630c.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=19630 |
| 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 | int4 testz19630() |
| 7 | { |
| 8 | return [0,0,0,0]; |
| 9 | } |
| 10 | |
| 11 | void test19630() |
| 12 | { |
| 13 | assert(testz19630()[] == [0,0,0,0]); |
| 14 | // { dg-error "'__vector\\\(int\\\[4\\\]\\\)' cannot be sliced with '\\\[\\\]'" "" { target *-*-* } .-1 } |
| 15 | } |