fpc/tests/tbs/tb0683.pp
Jonas Maebe 3e047d3691 * generate more efficient code for trunc(currency), trunc(comp), and
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 -
2020-12-27 13:18:47 +00:00

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}