mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 14:49:33 +02:00
* New test to catch i39851
This commit is contained in:
parent
b1e65ca49f
commit
8ba76f7d0a
28
tests/webtbs/tw39851.pp
Normal file
28
tests/webtbs/tw39851.pp
Normal file
@ -0,0 +1,28 @@
|
||||
{ %OPT=-O1 -OoPEEPHOLE }
|
||||
{$mode delphi}
|
||||
|
||||
{$C+}
|
||||
|
||||
program tw39851;
|
||||
|
||||
function Fn1: Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure TestCmpErr;
|
||||
var
|
||||
I: Integer;
|
||||
begin
|
||||
I := 0;
|
||||
if (I < 0) or (not Fn1()) then
|
||||
begin // this branch should NOT be executed
|
||||
ASSERT((I <= 0) and (not Fn1()));
|
||||
Halt(1);
|
||||
end;
|
||||
end;
|
||||
|
||||
begin
|
||||
TestCmpErr;
|
||||
WriteLn('ok');
|
||||
end.
|
Loading…
Reference in New Issue
Block a user