The currency type causes - when deliberately misinterpreted - internal error 2015070501
Original Reporter info from Mantis: Thaddy
-
Reporter name: Thaddy de Koning
Original Reporter info from Mantis: Thaddy
- Reporter name: Thaddy de Koning
Description:
Hint: (11031) End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.1.1-r36727 [2017/07/13] for arm
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Linux for ARMHF
(3104) Compiling curtest.pas
curtest.pas(8,15) Fatal: Internal error 2015070501
Fatal: (1018) Compilation aborted
Compilation failed.
Error: /usr/local/bin/ppcarm returned an error exitcode
Steps to reproduce:
program untitled;
{$HINTS ON}
var
cur, divisor: Currency;
begin
cur := 3.5;divisor := 1.5;
writeln(cur / divisor);
writeln(cur div divisor);
end.
Additional information:
Furthermore,
program untitled;
{$HINTS ON}
var
cur: Currency;
begin
cur := 3.5;
writeln(cur / currency(1.5));
// or
writeln(cur div currency(1.5));
end.
Will even crash a system completely.
Seems the currency type requires some extra protection...
Mantis conversion info:
- Mantis ID: 32146
- OS: all
- OS Build: all
- Platform: all
- Version: 3.1.1