mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 13:50:29 +02:00
* fixed real48 to double conversion for 0.0 (patch by "jeng", mantis #16863)
git-svn-id: trunk@15543 -
This commit is contained in:
parent
b3ca47e88a
commit
26cc281390
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10527,6 +10527,7 @@ tests/webtbs/tw16803.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1681.pp svneol=native#text/plain
|
||||
tests/webtbs/tw16820.pp svneol=native#text/plain
|
||||
tests/webtbs/tw16861.pp svneol=native#text/plain
|
||||
tests/webtbs/tw16863.pp svneol=native#text/plain
|
||||
tests/webtbs/tw16874.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1696.pp svneol=native#text/plain
|
||||
tests/webtbs/tw1699.pp svneol=native#text/plain
|
||||
|
@ -1403,6 +1403,13 @@ function fpc_int64_to_double(i : int64): double; compilerproc;
|
||||
exponent : word;
|
||||
|
||||
begin
|
||||
{ check for zero }
|
||||
if r[0]=0 then
|
||||
begin
|
||||
real2double:=0.0;
|
||||
exit;
|
||||
end;
|
||||
|
||||
{ copy mantissa }
|
||||
res[0]:=0;
|
||||
res[1]:=r[1] shl 5;
|
||||
|
8
tests/webtbs/tw16863.pp
Normal file
8
tests/webtbs/tw16863.pp
Normal file
@ -0,0 +1,8 @@
|
||||
var
|
||||
d : double;
|
||||
r : real48 = ($0, $0, $0, $0, $0, $0);
|
||||
BEGIN
|
||||
d := r;
|
||||
if d<>0.0 then
|
||||
halt(1);
|
||||
END.
|
Loading…
Reference in New Issue
Block a user