* fixed type consistency in handler for array parameters on platforms where

these have to be passed on the caller side (i.e., AArch64)

git-svn-id: trunk@40574 -
This commit is contained in:
Jonas Maebe 2018-12-16 20:44:38 +00:00
parent ac8411f3cf
commit 8845f4d1ce

View File

@ -768,7 +768,7 @@ implementation
as a dynamic array here } as a dynamic array here }
{ first restore the actual resultdef of left } { first restore the actual resultdef of left }
temparraydef:=left.resultdef; temparraydef:=left.resultdef;
left.resultdef:=parasym.vardef; left.resultdef:=resultdef;
{ get its address } { get its address }
lefttemp:=ctempcreatenode.create(voidpointertype,voidpointertype.size,tt_persistent,true); lefttemp:=ctempcreatenode.create(voidpointertype,voidpointertype.size,tt_persistent,true);
addstatement(initstat,lefttemp); addstatement(initstat,lefttemp);
@ -779,21 +779,19 @@ implementation
caddrnode.create_internal(left) caddrnode.create_internal(left)
) )
); );
{ restore the resultdef }
left.resultdef:=temparraydef;
{ now treat that address (correctly) as the original { now treat that address (correctly) as the original
dynamic array to get its start and length } dynamic array to get its start and length }
arraybegin:=cvecnode.create( arraybegin:=cvecnode.create(
ctypeconvnode.create_explicit(ctemprefnode.create(lefttemp), ctypeconvnode.create_explicit(ctemprefnode.create(lefttemp),
left.resultdef), temparraydef),
genintconstnode(0) genintconstnode(0)
); );
arraysize:=caddnode.create(muln, arraysize:=caddnode.create(muln,
geninlinenode(in_length_x,false, geninlinenode(in_length_x,false,
ctypeconvnode.create_explicit(ctemprefnode.create(lefttemp), ctypeconvnode.create_explicit(ctemprefnode.create(lefttemp),
left.resultdef) temparraydef)
), ),
genintconstnode(tarraydef(left.resultdef).elementdef.size) genintconstnode(tarraydef(temparraydef).elementdef.size)
); );
end end
else else