mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-04 10:30:21 +02:00
* 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:
parent
37625211f5
commit
02dff17ae0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user