[fpc-devel] Compiler 240 (and MySql)
Bernd Mueller
mueller.b at gmx.net
Mon Feb 22 18:02:41 CET 2010
Bernd Mueller wrote:
>
> I can confirm, that the program crashes on ARM-Linux/OABI/FPA/uClibc
> compiled with fpc 2.4.0. I think the problem is related to floating
> point, since an ordinary "writeln(1 / 3);" crashes the machine too.
>
my next guess is, that the 2.4.0 compiler has problems concerning
optimization. The program crashes, when the rtl is compiled with -O2.
program test;
{$mode objfpc}{$H+}
Begin
Writeln('Start');
Writeln(1 / 3);
Writeln('Stop');
End.
# ./test
Start
Runtime error 216 at $400AAAA8
$400AAAA8
$00010114 fpc_write_text_float, line 728 of
D:/fpc240/stable/src/rtl/inc/text.inc
$0000815C main, line 6 of project1.pas
$000080CC line 39 of
D:/fpc240/stable/src/rtl/inc/ustrings.incD:/fpc240/stable/src/rtl/unix/sysdir.inc
#
The program runs fine, if the optimization is disabled.
Regards, Bernd.
More information about the fpc-devel
mailing list