gcc/testsuite/gdc.dg/torture/simd9449.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=9449 |
| 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 | import core.simd; |
| 6 | |
| 7 | void test9449() |
| 8 | { |
| 9 | ubyte16[1] table; |
| 10 | } |
| 11 | |
| 12 | void test9449_2() |
| 13 | { |
| 14 | float[4][2] m = [[2.0, 1, 3, 4], [5.0, 6, 7, 8]]; // segfault |
| 15 | |
| 16 | assert(m[0][0] == 2.0); |
| 17 | assert(m[0][1] == 1); |
| 18 | assert(m[0][2] == 3); |
| 19 | assert(m[0][3] == 4); |
| 20 | |
| 21 | assert(m[1][0] == 5.0); |
| 22 | assert(m[1][1] == 6); |
| 23 | assert(m[1][2] == 7); |
| 24 | assert(m[1][3] == 8); |
| 25 | } |
| 26 | |
| 27 | void main() |
| 28 | { |
| 29 | test9449(); |
| 30 | test9449_2(); |
| 31 | } |