Debian Codegraph @

gcc/testsuite/gdc.dg/torture/simd9910.d

raw
1 // https://issues.dlang.org/show_bug.cgi?id=9910
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 main()
8 {
9 float4 f = [1, 1, 1, 1];
10 auto works = f + 3;
11 auto bug = 3 + f;
12
13 assert (works.array == [4,4,4,4]);
14 assert (bug.array == [4,4,4,4]); // no property 'array' for type 'int'
15 }