]> git.ipfire.org Git - people/ms/gcc.git/blame - gcc/testsuite/gdc.test/fail_compilation/fail155.d
d: Merge upstream dmd, druntime 4ca4140e58, phobos 454dff14d.
[people/ms/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail155.d
CommitLineData
b4c522fa
IB
1/*
2TEST_OUTPUT:
3---
8da8c7d3 4fail_compilation/fail155.d(20): Error: overlapping initialization for field `x` and `y`
5fee5ec3 5fail_compilation/fail155.d(20): `struct` initializers that contain anonymous unions must initialize only the first member of a `union`. All subsequent non-overlapping fields are default initialized
b4c522fa
IB
6---
7*/
8
9struct S
10{
11 int i;
12 union
13 {
14 int x;
15 int y;
16 }
17 int j;
18}
19
20S s = S( 1, 2, 3, 4 );