Mercurial > projects > dstress
annotate nocompile/offset_03.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 | f87ba6507260 |
children |
rev | line source |
---|---|
171 | 1 // $HeadURL$ |
2 // $Date$ | |
172 | 3 // $Author$ |
171 | 4 |
5 // .offset isn't supported for unions | |
6 | |
374 | 7 // __DSTRESS_ELINE__ 19 |
8 | |
171 | 9 module dstress.nocompile.offset_03; |
10 | |
11 union MyUnion{ | |
12 int a; | |
13 int b; | |
14 } | |
15 | |
16 int main(){ | |
17 MyUnion u; | |
18 | |
19 assert(u.a.offset >= 0); | |
20 assert(u.b.offset >= 0); | |
21 assert(u.a.offset != u.b.offset); | |
22 | |
23 return 0; | |
24 } |