]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/compilable/test8543.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / test8543.d
CommitLineData
b4c522fa 1
5fee5ec3 2static if (__traits(compiles, __vector(float[4])))
b4c522fa
IB
3{
4 struct vfloat
5 {
6 public:
7 __vector(float[4]) f32;
8
9 this(float X) nothrow
10 {
11 f32.ptr[0] = X;
12 f32.ptr[1] = X;
13 f32.ptr[2] = X;
14 f32.ptr[3] = X;
15 }
16 this(float X, float Y, float Z, float W) nothrow
17 {
18 f32.array[0] = X;
19 f32.array[1] = Y;
20 f32.array[2] = Z;
21 f32.array[3] = W;
22 }
23 this(float[4] values) nothrow
24 {
25 f32.array = values;
26 }
27 }
28
29 immutable GvfGlobal_ThreeA = vfloat(3.0f);
30 immutable GvfGlobal_ThreeB = vfloat(3.0f, 3.0f, 3.0f, 3.0f);
31 immutable GvfGlobal_ThreeC = vfloat([3.0f, 3.0f, 3.0f, 3.0f]);
32}