Mercurial > projects > dstress
annotate run/in_02.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 |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.in_02; | |
0 | 6 |
7 struct MyStruct{ | |
8 int x; | |
9 } | |
10 | |
11 void check(in MyStruct s){ | |
12 assert(s.x==1); | |
13 s.x++; | |
14 assert(s.x==2); | |
15 } | |
16 | |
17 int main(){ | |
18 MyStruct s; | |
19 s.x=1; | |
20 assert(s.x==1); | |
21 check(s); | |
22 assert(s.x==1); | |
23 return 0; | |
24 } |