Error in range test
Original Reporter info from Mantis: noname012
-
Reporter name: noname012
Original Reporter info from Mantis: noname012
- Reporter name: noname012
Description:
I tested a modified version of fpc\trunk\tests\tbs\tb0652.pp:
program rangeTest;
const
w : dword = 123;
n : dword = 48;
begin
if (w<=1) and (w>=10) then
writeln('error 1-10');
if (w>=1) and (w<=1000) then
writeln('ok')
else
writeln('error 1-1000');
if (n>44)and(n<48) then
writeln('error 48');
end.
The result is:
E:\lazarus\fpc\bin\i386-win32>fpc E:\rangeTest\rangeTest.pp -O3
Free Pascal Compiler version 3.3.1 [2018/10/02] for i386
Copyright (c) 1993-2018 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling E:\rangeTest\rangeTest.pp
Linking E:\rangeTest\rangeTest.exe
15 lines compiled, 0.1 sec, 26896 bytes code, 1300 bytes data
E:\lazarus\fpc\bin\i386-win32>E:\rangeTest\rangeTest.exe
ok
error 48
Mantis conversion info:
- Mantis ID: 34385
- OS: Windows
- OS Build: 10
- Version: 3.3.1
- Fixed in version: 3.3.1
- Fixed in revision: 40344 (#d1361ca6)