Mercurial > projects > dstress
annotate run/memory_management_03.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 | 38ea1bb385b6 |
children |
rev | line source |
---|---|
381 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.memory_management_03; | |
6 | |
870 | 7 void test(bool[] arr){ |
381 | 8 arr[1] = !arr[1]; |
9 } | |
10 | |
11 int main(){ | |
870 | 12 bool[] c; |
381 | 13 c.length=3; |
14 c[0]=true; | |
15 c[1]=false; | |
16 c[2]=false; | |
17 test(c); | |
18 assert(c[0]==true); | |
19 assert(c[1]==true); | |
20 assert(c[2]==false); | |
21 return 0; | |
22 } |