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_B;
|
|
11
|
|
12
|
|
13 struct Z {
|
|
14 union {
|
|
15 S s;
|
|
16 }
|
|
17 int x = 0x9ABC_DEF0;
|
|
18 }
|
|
19
|
|
20 struct S{
|
|
21 int y = 0x1234_5678;
|
|
22 }
|
|
23
|
|
24 int main(){
|
|
25 Z z;
|
|
26 if(0x9ABC_DEF0 != z.x){
|
|
27 assert(0);
|
|
28 }
|
|
29 if(0x1234_5678 != z.s.y){
|
|
30 assert(0);
|
|
31 }
|
|
32 return 0;
|
|
33 }
|