Browse Source

Dword mul bug added

pierre 26 years ago
parent
commit
a47951f647
3 changed files with 29 additions and 1 deletions
  1. 4 1
      bugs/bug0195.pp
  2. 24 0
      bugs/bug0199.pp
  3. 1 0
      bugs/readme.txt

+ 4 - 1
bugs/bug0195.pp

@@ -1,4 +1,7 @@
-uses graph,dpmiexcp;
+uses graph
+{$ifdef go32v2}
+,dpmiexcp
+{$endif go32v2};
 var
    GDriver, GMode: Integer;
    w:word;

+ 24 - 0
bugs/bug0199.pp

@@ -0,0 +1,24 @@
+PROGRAM PRTest;
+
+TYPE
+  ptRec = ^tRec;
+  tRec = Record
+           D : DWORD;
+         END;
+
+VAR
+  pR1, pR2 : ptRec;
+BEGIN
+  GetMem(pR1, SizeOf(tRec));
+  GetMem(pR2, SizeOf(tRec));
+
+  pR1^.D := 10;
+  Move(pR1^,pR2^,SizeOf(tRec));
+  WriteLn(pR1^.D:16,pR2^.D:16);
+
+  pR1^.D := 1;
+  pR2^.D := pR1^.D*2;			{ THE BUG IS HERE }
+  WriteLn(pR1^.D:16,pR2^.D:16);
+  if (pR1^.D<>1) or (pR2^.D<>2) then
+    Halt(1);
+END.

+ 1 - 0
bugs/readme.txt

@@ -264,3 +264,4 @@ bug0197.pp   should produce an error: problem with c1:=c2<c3 where c? is
              a comp type
 bug0198.pp   calling specifications aren't allowed in class declarations,
              this should be allowed
+bug0199.pp   bug in mul code