mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 19:48:08 +02:00

round(comp) on platforms where currency and comp are handled using the FPU o also fixes trunc(comp) and trunc(currency) compilation for x86 on LLVM with -Oofastmath * add missing removal of excess fpu precision typecasts for trunc/round git-svn-id: trunk@47854 -
23 lines
266 B
ObjectPascal
23 lines
266 B
ObjectPascal
{$ifndef SKIP_CURRENCY_TEST}
|
|
var
|
|
c: currency;
|
|
co: comp;
|
|
i: int64;
|
|
begin
|
|
c:=10.25;
|
|
co:=12;
|
|
i:=trunc(c);
|
|
if i<>10 then
|
|
halt(1);
|
|
i:=trunc(co);
|
|
if i<>12 then
|
|
halt(2);
|
|
i:=round(co);
|
|
if i<>12 then
|
|
halt(3);
|
|
end.
|
|
{$else}
|
|
begin
|
|
end.
|
|
{$endif}
|