Now have been able to test it for mode fpc, objpas and delphi: as I suspected, well, expected, runerror 216, access violation. Linux and Windows. That code is plain wrong. It will always fail (well, almost always if for some reason you have luck).
@MarkMLI in Mode Delphi, automatic deferencering is always on, so both forms should work (and do compile). But BOTH forms of the code crash as I expected....
Note I can not reproduce a kernel panic or crash, just the access violation. (all user mode)
(And at OP: the code does compile, you will just get a runtime error 216 as I predicted. My brain compiler from this morning is error prone, but not in this case and after testing with the real Freepascal compilers)