Local Record Passed Incorrectly with {$stackseg+}

Product Version(s): 3.20
Operating System:   MS-DOS
Flags: ENDUSER | TAR09596 buglist3.20 fixlist3.30
Last Modified: 20-OCT-1988    ArticleIdent: Q10405

There are problems with a string move when the source and target are
both on the stack. Incorrect code is generated for passing a stack
item as a value parameter with the {$stackseg+} metacommand in effect.
The problem occurs at the procedure call statement "d1(dx)", and
involves a string move where the source and target are both on the
stack. The code generated assumes that both source and target are
resident in dgroup (ds relative).

This assumption is false when $stackseg is enabled.

Microsoft has confirmed this to be a problem in Version 3.20. This
problem was corrected in Version 3.30.

The following is a short example program:

   {$stackseg+}
   module death;
   type
   deaths_head=record
   X,Y:integer;
   DATA:lstring(255);
   end;

   PROCEDURE D1(D:deaths_head)[public,windows];
   begin
   D.X:=d.y;
   end;

   procedure d2[public,windows];
   VAR DX:deaths_head;
   begin
   d1(dx);
   end;

   procedure d3[public,windows];
   VAR X:integer;
   FUNCTION D31(N:integer):integer;
   begin
   D31:=n+x;
   end;
   begin
   X:=5;
   X:=d31(10);
   end;
   end.
