Mercurial > projects > dstress
annotate run/return_04.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 | 014844597bbd |
children |
rev | line source |
---|---|
192 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.return_04; | |
6 | |
7 int status; | |
8 | |
9 int test(char[][] args){ | |
10 try{ | |
11 try{ | |
12 if(args.length==1){ | |
13 return -1; | |
14 } | |
15 }finally{ | |
16 assert(status==0); | |
17 status+=2; | |
18 } | |
19 }finally{ | |
20 assert(status==2); | |
21 status+=3; | |
22 } | |
23 return 0; | |
24 } | |
25 | |
26 int main(char[][] args){ | |
27 assert(status == 0); | |
28 assert(args.length == 1); | |
29 assert(test(args) == -1); | |
30 assert(status == 5); | |
31 return 0; | |
32 } |