Mercurial > projects > dstress
annotate run/switch_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 | f87ba6507260 |
children |
rev | line source |
---|---|
374 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstress.run.switch_04; | |
0 | 6 |
7 int main(){ | |
8 int test=10; | |
9 | |
10 assert(test==10); | |
11 switch(test){ | |
12 case 11:{ | |
13 test*=test; | |
14 case 10:{ | |
15 test+=2; | |
16 } | |
17 test+=3; | |
18 }case 12:{ | |
19 test+=1; | |
20 break; | |
21 } | |
22 default: test*=2; | |
23 } | |
24 assert(test==16); | |
25 | |
26 return 0; | |
27 } |