Mercurial > projects > dstress
annotate run/goto_11.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 |
---|---|
203 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
374 | 5 module dstress.run.goto_11; |
203 | 6 |
7 int status; | |
8 | |
9 int test(char[][] args){ | |
10 try{ | |
11 try{ | |
12 if(args.length==1){ | |
13 goto end; | |
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 end: | |
25 return -1; | |
26 } | |
27 | |
28 int main(char[][] args){ | |
29 assert(status == 0); | |
30 assert(args.length == 1); | |
31 assert(test(args) == -1); | |
32 assert(status == 5); | |
33 return 0; | |
34 } |