fpc/tests/webtbs/tw37780.pp
Jonas Maebe aa75d39ab5 * don't perform "(x=y) or (z=u)" -> "(x xor y) or (z xor u)" optimization
if z or u may raise exceptions (mantis #37780)

git-svn-id: trunk@46905 -
2020-09-20 12:43:45 +00:00

19 lines
262 B
ObjectPascal

program testbug;
type
PTestRec = ^TTestRec;
TTestRec = record
Val: Integer;
Next: PTestRec;
end;
var
TR: TTestRec;
begin
TR.Val := 6;
TR.Next := nil;
if (TR.Val = 10) or ((TR.Val = 5) and (TR.Next^.Val = 5)) then
Writeln('OK');
end.