1438
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 // @author@ Bill Baxter <wbaxter@gmail.com>
|
|
6 // @date@ 2007-03-12
|
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1055
|
|
8 // @desc@ [Issue 1055] union forward reference "overlapping initialization" error
|
|
9
|
|
10 module dstress.run.f.forward_reference_20_C;
|
|
11
|
|
12 struct S{
|
|
13 int y = 0x1234_5678;
|
|
14 }
|
|
15
|
|
16 struct Z {
|
|
17 union {
|
|
18 S s;
|
|
19 }
|
|
20 int x = 0x9ABC_DEF0;
|
|
21 }
|
|
22
|
|
23 int main(){
|
|
24 Z z;
|
|
25 if(0x9ABC_DEF0 != z.x){
|
|
26 assert(0);
|
|
27 }
|
|
28 if(0x1234_5678 != z.s.y){
|
|
29 assert(0);
|
|
30 }
|
|
31 return 0;
|
|
32 }
|