summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw38202.pp
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-12-12 21:39:17 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2020-12-12 21:39:17 +0000
commit14df3f984fc083f85c4ecd78609e65a4bcc8a451 (patch)
tree9cb09c2767acb3d4d9b420bed1eea9fe897aff3e /tests/webtbs/tw38202.pp
parent094f7b321d595656a6477ba52e6b3a62fea329ea (diff)
downloadfpc-14df3f984fc083f85c4ecd78609e65a4bcc8a451.tar.gz
* patch by Zoran Vučenović: fixes TDoubleRec.SetFrac, resolves #38202
+ test git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@47765 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/webtbs/tw38202.pp')
-rw-r--r--tests/webtbs/tw38202.pp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/webtbs/tw38202.pp b/tests/webtbs/tw38202.pp
new file mode 100644
index 0000000000..de0830de5b
--- /dev/null
+++ b/tests/webtbs/tw38202.pp
@@ -0,0 +1,21 @@
+program Project1;
+
+{$mode objfpc}{$H+}
+
+uses
+ SysUtils;
+
+var
+ D: Double;
+ Q: QWord;
+
+begin
+ D := -1;
+
+ Q := D.Frac;
+ D.Frac := Q; // the sign is lost!
+
+ if D<>-1 then
+ halt(1);
+ WriteLn('ok');
+end.