This code gives distinct results when compiled for Win32 and Win64
- Win32: 49744125
- Win64: 49744124.999
procedure Test;
var
D: Double;
begin
D := 3 * (exp(3 * ln(255)));
WriteLn('Result: ' + FloatToStr(D));
end;
Somewhere is precision loss (or extra rounding). Is this good?
> Hello,
>
> You have not read closely what I wrote before:
Sorry, earlier I try your hint - and result was bad.
Perhaps I did something wrong.
But I repeat it now - and it is working. Thank you again.
Finally my working build script look like this:
set UNITS_PATH=.\packages\*
set
Unfortunately I tried it and this doesn't work.
Problem only with 'sysinitpas.pp' unit.
He is not depends on other RTL units, but linked into final executable by
compiler.
I suppose, compiler itself depends on internal layout of this unit.
And a solution is to compile 'sysinitpas.pp' with the same
Thank you, i will try this.
> I've take a look at you RTL compile script and found the mess with the
compiler options.
>
> When compiling RTL you should disable reading of options from fpc.cfg
using the -n switch.
> When compiling the system unit use the -Us switch.
> Additionally specify only
RTL not modified. Just recompilation of 'sysinitpas.pp' unit with some
options causes problem.
Here is another test project that uses your current official FPC
installation with unmodified RTL:
http://dl.free.fr/ePtkQwgJJ
Test project contains source of 'sysinitpas.pp' (and required
ompiler and minimal RTL):
http://dl.free.fr/nHDbSOzOQ
> Hmmm, I've seen regvar problems before. Can you provide the assembly
> dumps of that file under -O2 and -O2 -OoNOREGVAR respectively? It might
> reveal something.
>
> Gareth aka. Kit
>
> On 20/05/2021 09:07, NetSpirit via
Answer for my previous message
(https://lists.freepascal.org/pipermail/fpc-devel/2021-January/043512.html).
Memory leak happens when unit 'rtl\win32\sysinitpas.pp' compiled with
"-O2" or higher.
To eliminate this bug add "-O-" or "-OoNOREGVAR" to command-line when
compile this unit. This disables
I am using custom build of minimal FPC RTL and found possible bug. When
unit 'system' (or some other?) compiled using -O2 (or higher) option in
'fpc.cfg', then application, compiled using this unit, increase memory
usage every time BeginThread() function is called.
This appears on FPC 3.2.0 and
> if anyone wants to assign me one of the new bugs to fix that have been
> raised since the RC was released, I'll be happy to take a look. >
> Gareth aka. Kit
Not special for this RC but some bugs:
===
1) packages\winunits-base\src\wininet.pp
Compilation error in -Mdelphiunicode: bad