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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
203
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
1 // $HeadURL$
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
2 // $Date$
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
3 // $Author$
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
4
374
f87ba6507260 added missing meta-data
thomask
parents: 203
diff changeset
5 module dstress.run.goto_11;
203
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
6
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
7 int status;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
8
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
9 int test(char[][] args){
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
10 try{
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
11 try{
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
12 if(args.length==1){
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
13 goto end;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
14 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
15 }finally{
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
16 assert(status==0);
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
17 status+=2;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
18 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
19 }finally{
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
20 assert(status==2);
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
21 status+=3;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
22 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
23 return 0;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
24 end:
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
25 return -1;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
26 }
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
27
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
28 int main(char[][] args){
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
29 assert(status == 0);
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
30 assert(args.length == 1);
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
31 assert(test(args) == -1);
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
32 assert(status == 5);
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
33 return 0;
85ed61918ae4 added "intervening finally" tests for break and goto
thomask
parents:
diff changeset
34 }