Mercurial > projects > dstress
annotate run/t/template_33_B.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 | 5511f9277078 |
children |
rev | line source |
---|---|
917 | 1 // $HeadUR$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ Dave <Dave_member@pathlink.com> | |
6 // @date@ 2006-03-18 | |
7 // @uri@ news:dvgq34$22hv$1@digitaldaemon.com | |
8 | |
9 module dstress.run.t.template_33_B; | |
10 | |
11 template sum(creal x){ | |
12 static if (x.re <= 1.0L){ | |
13 const creal sum = x; | |
14 }else{ | |
15 const creal sum = x + sum!(x - 1.0L); | |
16 } | |
17 } | |
18 | |
19 int main(){ | |
920 | 20 creal x = sum!(2.0L + 0.0Li); |
917 | 21 |
920 | 22 if(x != 3.0L + 0.0Li){ |
917 | 23 assert(0); |
24 } | |
25 | |
26 return 0; | |
27 } |