gcc/testsuite/gdc.test/fail_compilation/xmmslice.d
raw| 1 | |
| 2 | /* REQUIRED_ARGS: -mcpu=avx |
| 3 | DISABLED: win32 freebsd32 openbsd32 linux32 osx32 |
| 4 | TEST_OUTPUT: |
| 5 | --- |
| 6 | fail_compilation/xmmslice.d(110): Error: `__vector(int[4])` cannot be sliced with `[]` |
| 7 | --- |
| 8 | */ |
| 9 | |
| 10 | #line 100 |
| 11 | |
| 12 | import core.simd; |
| 13 | |
| 14 | int4 testz4() |
| 15 | { |
| 16 | return [0,0,0,0]; |
| 17 | } |
| 18 | |
| 19 | void test() |
| 20 | { |
| 21 | assert(testz4()[] == [0,0,0,0]); |
| 22 | } |