mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 05:29:26 +02:00
* changed allocating a temp with type sinttype and size sinttype*dims for
with a ctemprefnode.create_offset() hack into a proper array, because the old way does not work at all with LLVM (and is ugly) git-svn-id: trunk@33724 -
This commit is contained in:
parent
ffe4e7fada
commit
abe8d44f37
@ -3958,7 +3958,7 @@ implementation
|
|||||||
newblock:=internalstatements(newstatement);
|
newblock:=internalstatements(newstatement);
|
||||||
|
|
||||||
{ get temp for array of lengths }
|
{ get temp for array of lengths }
|
||||||
temp:=ctempcreatenode.create(sinttype,dims*sinttype.size,tt_persistent,false);
|
temp:=ctempcreatenode.create(carraydef.getreusable(sinttype,dims),dims*sinttype.size,tt_persistent,false);
|
||||||
addstatement(newstatement,temp);
|
addstatement(newstatement,temp);
|
||||||
|
|
||||||
{ load array of lengths }
|
{ load array of lengths }
|
||||||
@ -3967,7 +3967,10 @@ implementation
|
|||||||
while assigned(ppn.right) do
|
while assigned(ppn.right) do
|
||||||
begin
|
begin
|
||||||
addstatement(newstatement,cassignmentnode.create(
|
addstatement(newstatement,cassignmentnode.create(
|
||||||
ctemprefnode.create_offset(temp,counter*sinttype.size),
|
cvecnode.create(
|
||||||
|
ctemprefnode.create(temp),
|
||||||
|
genintconstnode(counter)
|
||||||
|
),
|
||||||
ppn.left));
|
ppn.left));
|
||||||
ppn.left:=nil;
|
ppn.left:=nil;
|
||||||
dec(counter);
|
dec(counter);
|
||||||
@ -3977,8 +3980,11 @@ implementation
|
|||||||
ppn.left:=nil;
|
ppn.left:=nil;
|
||||||
|
|
||||||
{ create call to fpc_dynarr_setlength }
|
{ create call to fpc_dynarr_setlength }
|
||||||
npara:=ccallparanode.create(caddrnode.create_internal
|
npara:=ccallparanode.create(caddrnode.create_internal(
|
||||||
(ctemprefnode.create(temp)),
|
cvecnode.create(
|
||||||
|
ctemprefnode.create(temp),
|
||||||
|
genintconstnode(0)
|
||||||
|
)),
|
||||||
ccallparanode.create(cordconstnode.create
|
ccallparanode.create(cordconstnode.create
|
||||||
(dims,sinttype,true),
|
(dims,sinttype,true),
|
||||||
ccallparanode.create(caddrnode.create_internal
|
ccallparanode.create(caddrnode.create_internal
|
||||||
|
Loading…
Reference in New Issue
Block a user