gcc/testsuite/gdc.dg/torture/simd22438.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=22438 |
| 2 | // { dg-additional-options "-mavx" { target avx_runtime } } |
| 3 | // { dg-do run } |
| 4 | // { dg-skip-if "needs gcc/config.d" { ! d_runtime } } |
| 5 | |
| 6 | struct T22438 { int x; double d; } |
| 7 | |
| 8 | T22438 foo22438(int x, double d) { return T22438(x, d); } |
| 9 | |
| 10 | struct S22438 { T22438 t; string r; } |
| 11 | |
| 12 | void main() |
| 13 | { |
| 14 | S22438 s = S22438(foo22438(10, 3.14), "str"); |
| 15 | assert(s.t.x == 10); |
| 16 | assert(s.t.d == 3.14); |
| 17 | assert(s.r == "str"); |
| 18 | } |