Hi!
I have a large project and it compiles under 32 bits cpu, but doesn't under 64 bits. Here is a minimal problematic part:
=====================================================
~/temp]$ cat ptrtransform.pas
{$MODE OBJFPC}
const
C = -1;
var
A: array[0..1] of Pointer;
begin
Writeln(Integer(Pointer((PtrUInt(@A[1]) + C * SizeOf(Pointer)))^));
end.~/temp]$ fpc ptrtransform.pas
ptrtransform.pas(7,66) Fatal: Internal error 200706094 Fatal: Compilation aborted
Error: /home/doj/fpc/2.7.1/bin/ppcx64 returned an error exitcode
~/temp]$ fpc -iW
2.7.1
=====================================================
IMO the problem is the transformation -1 into an unsigned value. (Unsigned(-1) > Max(Signed).)
How can I rewrite this code to make it correct? I want to use constants to calculate offsets from untyped pointer.
