fpc/tests/webtbs/tw36863.pp
marco 775567e8f7 # revisions: 44598,45635,45757,45764,45772
git-svn-id: branches/fixes_3_2@45849 -
2020-07-24 21:09:00 +00:00

31 lines
557 B
ObjectPascal

{ %OPT=-Ct -CR }
{$M 65536,65536}
type
TObj = object
v: array [0..$2000] of Byte;
procedure Proc(depth: Integer);
procedure VProc; virtual;
end;
procedure TObj.VProc;
begin
end;
procedure TObj.Proc(depth: Integer);
begin
{stack is eaten here on the function entry}
if (depth < 64) then
Proc(depth+1);
{do not actually call the method since the obj is not initialized, just for minimal demonstration}
if (depth < 0) then
VProc;
end;
var
Obj: TObj;
begin
Obj.Proc(0);
writeln('Completed');
end.