[fpc-devel] Re: compiler bug?
Peter Vreman
peter at freepascal.org
Fri Dec 31 10:47:22 CET 2004
> How about this one:
>
>
> program problem;
> begin
> Write('Test One: ');
> if ( boolean(255) ) then WriteLn(True) else WriteLn(False);
> Write('Test Two: ');
> WriteLn( boolean(255) );
> end.
>
>
> FPC 1.9.4 output:
> Test One: FALSE
> Test Two: TRUE
>
> Kylix 1.0 output:
> Test One: TRUE
> Test Two: Segmentation fault
>
>
>
> Looks like *somebody* has a compiler bug, anyway ;-)
>
We know this issue. There is even a comment in the RTL what can go wrong:
{ Can't use array[boolean] because b can be >0 ! }
if b then
Write_Str(Len,t,'TRUE')
else
Write_Str(Len,t,'FALSE');
More information about the fpc-devel
mailing list