Wrong constant value with bitpacked Int64 on 32bit fpc
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
Tested with 3.0.4
Compile the below example
For 64bit result is correct
For 32bit (native or cross compiled) result is
9223372034707292159 // $7fffffff7fffffff the value is duplicated
2
Steps to reproduce:
program Project1;
type
TBitSize = -7..7;
TFpDbgValueSize = bitpacked record
Size: Int64;
BitSize: TBitSize;
end;
const
gcFpDbgValueSize: TFpDbgValueSize = (Size: $7FFFFFFF; BitSize: 2);
begin
writeln(gcFpDbgValueSize.Size);
writeln(gcFpDbgValueSize.BitSize);
readln;
end.