Mercurial > projects > dstress
view run/f/forward_reference_20_B.d @ 1576:b3e16c86558e
[Issue 1398] New: GDC doesn't generate correct code
<mariusmuja@gmail.com>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1398
author | thomask |
---|---|
date | Thu, 21 Feb 2008 15:20:08 +0000 |
parents | ca5b18e46ec7 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Bill Baxter <wbaxter@gmail.com> // @date@ 2007-03-12 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1055 // @desc@ [Issue 1055] union forward reference "overlapping initialization" error module dstress.run.f.forward_reference_20_B; struct Z { union { S s; } int x = 0x9ABC_DEF0; } struct S{ int y = 0x1234_5678; } int main(){ Z z; if(0x9ABC_DEF0 != z.x){ assert(0); } if(0x1234_5678 != z.s.y){ assert(0); } return 0; }