Skip to content

compiler: New min/max intrinsic broke x86_64-win64 in c79361c0

The revision to blame

C:\projects\fpc>git bisect good
Bisecting: 0 revisions left to test after this (roughly 1 step)
[c79361c010621b76e379dfdd9a697f640aa70f85]   * Min/max intrinsics now simplify deterministic result                                                                   

The following test

{$mode delphi}
uses math;
var a,b,dx:integer;
begin
   a:=100;
   b:=200;
   dx := min(
      min(a, b),
      max(a, b) - 1
      );    
   writeln(dx);
end.

Prints "0" when compiled with options ppcx64 -Mdelphi -O1 a.pas

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information