Browse Source

* simple test for the bug

git-svn-id: trunk@1216 -
peter 20 years ago
parent
commit
a5582e346f
2 changed files with 32 additions and 0 deletions
  1. 1 0
      .gitattributes
  2. 31 0
      tests/webtbs/tw4388.pp

+ 1 - 0
.gitattributes

@@ -6304,6 +6304,7 @@ tests/webtbs/tw4294.pp svneol=native#text/plain
 tests/webtbs/tw4308.pp svneol=native#text/plain
 tests/webtbs/tw4308.pp svneol=native#text/plain
 tests/webtbs/tw4336.pp svneol=native#text/plain
 tests/webtbs/tw4336.pp svneol=native#text/plain
 tests/webtbs/tw4350.pp svneol=native#text/plain
 tests/webtbs/tw4350.pp svneol=native#text/plain
+tests/webtbs/tw4388.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1873.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/ub1883.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain
 tests/webtbs/uw0555.pp svneol=native#text/plain

+ 31 - 0
tests/webtbs/tw4388.pp

@@ -0,0 +1,31 @@
+{ %opt=-O2r }
+{ %cpu=i386 }
+{$mode delphi}
+
+type
+  TBigInt=record
+    Digits : PInt64;
+  end;
+  PBigInt=^TBigInt;
+var
+  a : PBigInt;
+  t : int64;
+  m : longint;
+begin
+  new(a);
+  with a^ do
+    begin
+      new(Digits);
+      m:=10;
+      asm
+          mov   eax, m
+          mul   eax
+          mov   t[0], eax
+          mov   t[4], edx
+      end ['EAX','EDX'];
+      Digits^:=t;
+      writeln(Digits^);
+      if Digits^<>100 then
+        halt(1);
+    end;
+end.