* taddrnode: fixed getting the address of nested procs in tp mode in i8086 far

data memory models

git-svn-id: trunk@27816 -
This commit is contained in:
nickysn 2014-05-23 22:38:07 +00:00
parent 37625211f5
commit 02dff17ae0

View File

@ -481,6 +481,7 @@ implementation
hp : tnode;
hsym : tfieldvarsym;
isprocvar : boolean;
procpointertype: tdef;
begin
result:=nil;
typecheckpass(left);
@ -541,14 +542,18 @@ implementation
if isprocvar or
is_nested_pd(tabstractprocdef(left.resultdef)) then
begin
if tabstractprocdef(left.resultdef).is_methodpointer then
procpointertype:=methodpointertype
else
procpointertype:=nestedprocpointertype;
{ find proc field in methodpointer record }
hsym:=tfieldvarsym(trecorddef(methodpointertype).symtable.Find('proc'));
hsym:=tfieldvarsym(trecorddef(procpointertype).symtable.Find('proc'));
if not assigned(hsym) then
internalerror(200412041);
{ Load tmehodpointer(left).proc }
result:=csubscriptnode.create(
hsym,
ctypeconvnode.create_internal(left,methodpointertype));
ctypeconvnode.create_internal(left,procpointertype));
left:=nil;
end
else