+ new test file

This commit is contained in:
pierre 2002-04-15 20:47:39 +00:00
parent 6d3ac41ce6
commit a18260037a

23
tests/webtbs/tw1932.pp Normal file
View File

@ -0,0 +1,23 @@
{ %OPT=-O2 }
{ Source provided for Free Pascal Bug Report 1932 }
{ Submitted by "Rob Kolstad" on 2002-04-15 }
{ e-mail: kolstad@ace.delos.com }
program breaksusingO2;
var
i, ans:longint;
data:array[1..2,0..1] of longint;
begin
data[1,0] := 2; data[1,1] := 7;
data[2,0] := 6; data[2,1] := 9;
i:= 1;
ans := 0;
writeln ('calculated diff = ',data[i,1]-data[i+1,0]);
if data[i,1]>data[i+1,0] then begin
ans := data[i,1]-data[i+1,0];
// I think that data[i+1,0] is being evaluated to 0...RK
end;
// ans should be 1
writeln('ans should = 1, but ans=', ans);
if ans <> 1 then
halt(1);
end.