*** empty log message ***

This commit is contained in:
florian 2000-04-11 20:34:43 +00:00
parent 6ea5534991
commit fc39bd3f95
2 changed files with 34 additions and 0 deletions

View File

@ -2,5 +2,6 @@ This directory contains some tests which test the optimizer
Register variables:
Enumerations .......................... testreg1.pp
Readln ................................ testreg2.pp
Range checking ........................ testreg3.pp
Common subexpression elimination (assembler)
Multidimensional array index operation. testcse1.pp

33
tests/testopt/testreg3.pp Normal file
View File

@ -0,0 +1,33 @@
{ $OPT=-Or}
program rangecse;
{$r+}
type
pa = ^ta;
ta = array[0..100] of longint;
procedure t;
var
i, j: longint;
p: pa;
begin
new(p);
fillchar(p^,101*sizeof(longint),0);
p^[100] := 5;
j := 5;
for i:=1 to 101 do
if j=p^[i-1] then
begin
writeln('found!');
dispose(p);
exit;
end;
writeln('failed..');
dispose(p);
halt(1);
end;
begin
t;
end.