+ tbs0182 from bug0182

This commit is contained in:
pierre 1998-11-23 18:31:25 +00:00
parent c921c95996
commit 18acc6d871

31
tests/tbs0182.pp Normal file
View File

@ -0,0 +1,31 @@
TYPE Rec = RECORD
x:WORD;
y:WORD;
END;
Rec1 = Record
x,y : longint;
end;
Rec2 = Record
r,s : Rec1;
z : word;
end;
plongint = ^longint;
VAR s:WORD;
r:Rec;
rr : Rec2;
CONST p1:POINTER = @s; { Works fine }
p2:POINTER = @R.y; { illegal expression }
p3:pointer = @rr.s.y;
p4:plongint = @rr.s.y;
BEGIN
rr.s.y:=15;
if plongint(p3)^<>15 then
Begin
Writeln('Error : wrong code generated');
Halt(1);
End;
END.