mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 23:06:07 +02:00
Dword mul bug added
This commit is contained in:
parent
77f7afffa9
commit
a47951f647
@ -1,4 +1,7 @@
|
|||||||
uses graph,dpmiexcp;
|
uses graph
|
||||||
|
{$ifdef go32v2}
|
||||||
|
,dpmiexcp
|
||||||
|
{$endif go32v2};
|
||||||
var
|
var
|
||||||
GDriver, GMode: Integer;
|
GDriver, GMode: Integer;
|
||||||
w:word;
|
w:word;
|
||||||
|
24
bugs/bug0199.pp
Normal file
24
bugs/bug0199.pp
Normal file
@ -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.
|
@ -264,3 +264,4 @@ bug0197.pp should produce an error: problem with c1:=c2<c3 where c? is
|
|||||||
a comp type
|
a comp type
|
||||||
bug0198.pp calling specifications aren't allowed in class declarations,
|
bug0198.pp calling specifications aren't allowed in class declarations,
|
||||||
this should be allowed
|
this should be allowed
|
||||||
|
bug0199.pp bug in mul code
|
||||||
|
Loading…
Reference in New Issue
Block a user