Using a syscall modifier triggers internal error 2019050526
## Summary Declaring a procedure or function with a syscall modifier and compiling that for a platform that does not support syscalls triggers internal error 2019050526. ## System Information - **Operating system:** Any that does not support the syscall modifier - **Processor architecture:** Any - **Compiler version:** tested with trunk but is around since the introduction of the syscall modifier - **Device:** Any ## Steps to reproduce Try to compile the provided test example for a target that does not support the syscall modifier (for example linux-x86_64). e.g. ``` fpc -B -vehw test.pas ``` ## Example Project ```pascal program test; var execBase: pointer; procedure test_a_syscall; syscall execBase 6; begin writeln('syscall test'); end. ``` ## What is the current bug behaviour? Compiler output: ``` test.pas(5,29) Warning: Calling convention directive ignored: "SysCall" test.pas(5,37) Fatal: Internal error 2019050526 Fatal: Compilation aborted ``` ## What is the expected (correct) behaviour? Perhaps a more user friendly/explanatory error message instead of warning that the compiler ignores the syscall (which it actually does not do, as it still tries to parse the syscall and ends up at the internal error) ? ## Possible fixes This can't be fixed for those platforms that do not support the syscall modifier. Hence the suggestion for a more user friendly error message. Reported so that it is at least listed somewhere.
issue