fpc/tests/test/opt/tgotoreg.pp
Jonas Maebe dcb69b44b9 * fixed some test/opt tests
+ include test/opt directory in Makefile

git-svn-id: trunk@8198 -
2007-07-29 19:35:52 +00:00

40 lines
437 B
ObjectPascal

{ %OPT=-Ooregvar }
{$goto on}
var
global: longint;
procedure t1;
begin
{ make sure it's not put in a register in t }
global := 1;
end;
procedure t;
var
l: longint;
s1,s2,s3: ansistring;
label lab;
begin
t1;
l := 1;
s1 := 'ABC';
s2 := 'DEF';
s3 := '';
lab:
inc(l);
inc(global);
if global > 10 then
halt(1);
if l = 10 then
s3 := 'ABCDEF';
if s1+s2 <> s3 then
goto lab;
end;
begin
t;
end.