Mercurial > projects > dstress
view run/n/nested_function_07_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 | be2b20dc0eb4 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Fredrik Olsson <peylow@gmail.com> // @date@ 2005-11-30 // @uri@ news:dmjkbv$31is$1@digitaldaemon.com // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1033 module dstress.run.n.nested_function_07_B; int outer() { int a = 3; int inner(int b) { a += b; if (b > 0) { return inner(b - 1); } else { return a; } } return inner(a); } int main(char[][] args) { assert(outer() == 9); return 0; }