Mercurial > projects > dstress
annotate nocompile/offset_01.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | f87ba6507260 |
children |
rev | line source |
---|---|
171 | 1 // $HeadURL$ |
2 // $Date$ | |
172 | 3 // $Author$ |
171 | 4 |
5 // .offset is depricated, use .offsetof | |
6 | |
374 | 7 // __DSTRESS_ELINE__ 19 |
8 | |
171 | 9 module dstress.nocompile.offset_01; |
10 | |
11 struct MyStruct{ | |
12 int a; | |
13 int b; | |
14 } | |
15 | |
16 int main(){ | |
17 MyStruct s; | |
18 | |
19 assert(s.a.offset >= 0); | |
20 assert(s.b.offset >= 0); | |
21 assert(s.a.offset != s.b.offset); | |
22 | |
23 return 0; | |
24 } |