fpc/tests/webtbs/tw17402a.pp
Jonas Maebe bd69be344c * replaced -O2 with -Ootailrec, because that's the optimization that has
to be active (apparently -Ootailrec is currently not enabled for ppc64
    with -O2)

git-svn-id: trunk@16000 -
2010-09-17 09:13:39 +00:00

19 lines
316 B
ObjectPascal

{ %opt=-Ootailrec -Cs1000000 }
{$mode objfpc}
{ check if tail recursion optimization works, at least on 32 bit OSes }
function fac(i : int64) : int64;
var
a : array[0..100000] of longint;
begin
a[1]:=1;
if i=0 then
result:=1
else
result:=fac(i-1);
end;
begin
fac(4000000);
end.