Mercurial > projects > dstress
view run/d/double_27_D.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 | 23fe17e22a63 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // based on: gcc.c-torture/execute/ieee/acc2.c module dstress.run.d.double_27_D; double func (double *array){ double d = *array; if (d == 1.0){ return d; }else{ return d + func (array + 1); } } int main (){ const double values[] = [double.max, 2.0, 0.5, 1.0]; if(func(values.ptr) != double.max){ assert(0); } return 0; }