Don't warn when alignment of global common data exceeds maximum alignment.
[official-gcc.git] / gcc / testsuite / gdc.dg / gdc183.d
blobaa8a79c53e549461f00b8ca28bb88b9dd9b49028
1 // https://bugzilla.gdcproject.org/show_bug.cgi?id=183
2 // { dg-do compile }
4 struct S183a
6 union I183a
8 struct
10 double x, y, z;
12 struct
14 double a, b, c;
18 I183a inner;
20 this(double x, double y, double z)
22 this.inner.x = x;
23 this.inner.y = y;
24 this.inner.z = z;
28 struct S183b
30 @property get()
32 union Buf
34 void[0] result;
36 const Buf buf = { };
37 return buf.result;
41 struct S183c
43 @property get()
45 union Buf
47 TypeInfo info;
48 void[0] result;
50 const Buf buf = { };
51 return buf.result;
55 void test183()
57 auto v1 = S183a(0, 0, 0);
58 auto v2 = S183b().get;
59 auto v3 = S183c().get;