There are several conceptual problems with that "SwapPoint" definition.
The first one is that the parameter InR is being passed by address which openly violates what the documentation states that, in FPC unlike in Delphi, "const" should not be presumed (or cause) a parameter to be passed by reference.
The second is that the call, SwapPoint(R, R) is only valid if the first parameter is passed by value which it should be but isn't and, since it isn't then the "const" contract is violated because because the In parameter is effectively an Out parameter passed by reference.
Very unfortunately and, contrary to what is documented, FPC causes all const parameters larger than a register to be passed by reference _and_ also very unfortunately there is code whose proper functioning depends on that behavior. One of the most common cases is found in COM definitions where a REFIID, which is a pointer to a GUID, is often specified as a "const GUID<variation>", the only reason that work is because the "const" causes the GUID to be passed by reference. For the record, that the one case, I cannot forget but, it is not the only case.