Mercurial > projects > dstress
annotate run/i/if_10_F.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 | 976d6a6a7907 |
children |
rev | line source |
---|---|
886 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 module dstess.run.i.if_10_F; | |
6 | |
7 int test(int i){ | |
8 if (i--) | |
9 if (!i) | |
10 return 4; | |
11 return 5; | |
12 return 6; | |
13 } | |
14 | |
15 int main(){ | |
16 if(test(1) != 4){ | |
17 assert(0); | |
18 } | |
19 | |
20 if(test(2) != 5){ | |
21 assert(0); | |
22 } | |
23 | |
24 if(test(0) != 5){ | |
25 assert(0); | |
26 } | |
27 | |
28 return 0; | |
29 } |