gcc/testsuite/gdc.test/fail_compilation/vector_cast.d
raw| 1 | /** |
| 2 | REQUIRED_ARGS: -m64 |
| 3 | TEST_OUTPUT: |
| 4 | --- |
| 5 | fail_compilation/vector_cast.d(11): Error: cannot cast expression `a` of type `int[3]` to `__vector(int[4])` |
| 6 | fail_compilation/vector_cast.d(13): Error: cannot cast expression `a` of type `int[5]` to `__vector(int[4])` |
| 7 | --- |
| 8 | */ |
| 9 | |
| 10 | alias int4 = __vector(int[4]); |
| 11 | int4 convtest3(int[3] a) { return cast(int4) a; } |
| 12 | int4 convtest4(int[4] a) { return cast(int4) a; } |
| 13 | int4 convtest5(int[5] a) { return cast(int4) a; } |