mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-31 22:10:51 +02:00
* when emitting the procedure address part of a complex procvar, type
that address as an "address-only" procvar instead of supposedly emitting a complex procvar itself as the address part of that same complex procvar type (part of fixing test/tmaclocalprocparam4e.pp for llvm) git-svn-id: trunk@34117 -
This commit is contained in:
parent
cdfe299f23
commit
c71bc54785
@ -1307,7 +1307,8 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
|
||||
procedure tasmlisttypedconstbuilder.parse_procvardef(def:tprocvardef);
|
||||
var
|
||||
tmpn,n : tnode;
|
||||
pd : tprocdef;
|
||||
pd : tprocdef;
|
||||
procaddrdef: tprocvardef;
|
||||
havepd,
|
||||
haveblock: boolean;
|
||||
begin
|
||||
@ -1349,7 +1350,8 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
|
||||
{ in case of a nested procdef initialised with a global routine }
|
||||
ftcb.maybe_begin_aggregate(def);
|
||||
{ to handle type conversions }
|
||||
ftcb.queue_init(def);
|
||||
procaddrdef:=cprocvardef.getreusableprocaddr(def);
|
||||
ftcb.queue_init(procaddrdef);
|
||||
{ remove typeconvs, that will normally insert a lea
|
||||
instruction which is not necessary for us }
|
||||
while n.nodetype=typeconvn do
|
||||
@ -1403,7 +1405,7 @@ function get_next_varsym(def: tabstractrecorddef; const SymList:TFPHashObjectLis
|
||||
end
|
||||
else if n.nodetype=pointerconstn then
|
||||
begin
|
||||
ftcb.queue_emit_ordconst(tpointerconstnode(n).value,def);
|
||||
ftcb.queue_emit_ordconst(tpointerconstnode(n).value,procaddrdef);
|
||||
if not def.is_addressonly then
|
||||
ftcb.emit_tai(Tai_const.Create_sym(nil),voidpointertype);
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user