fpc-2.1.1 r4075
linux-i386
If I understand the purpose of function align
(rtl/inc/{systemh.inc,generic.inc}) correctly, it gives wrong results when used with pointers > $8000000.
Align uses ptrint. Using ptrUint instead works.
I tried using it to align a array to 4k bounds, like this:
p:=getmem(MyAry,sizeof(MyAry)+4096); p:=align(p,4096);IMO align($80000001,$1000) should give $80001000, but gives $80002000.
Attached is a testcase and a patch.
