mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 06:51:17 +02:00
Merged revisions 2191 via svnmerge from
svn+ssh://jonas@svn.freepascal.org/FPC/svn/fpc/trunk r2191 (jonas) * test for register variables and goto git-svn-id: branches/fixes_2_0@2207 -
This commit is contained in:
parent
26ac1d18c3
commit
c81af0b2f8
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -5234,6 +5234,7 @@ tests/test/opt/tcmov.pp svneol=native#text/plain
|
||||
tests/test/opt/tcse1.pp svneol=native#text/plain
|
||||
tests/test/opt/tcse2.pp svneol=native#text/plain
|
||||
tests/test/opt/tcse3.pp svneol=native#text/plain
|
||||
tests/test/opt/tgotoreg.pp svneol=native#text/plain
|
||||
tests/test/opt/treg1.pp svneol=native#text/plain
|
||||
tests/test/opt/treg2.dat -text
|
||||
tests/test/opt/treg2.pp svneol=native#text/plain
|
||||
|
39
tests/test/opt/tgotoreg.pp
Normal file
39
tests/test/opt/tgotoreg.pp
Normal file
@ -0,0 +1,39 @@
|
||||
{% OPT=-Or}
|
||||
|
||||
{$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.
|
||||
|
Loading…
Reference in New Issue
Block a user