mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-15 13:49:58 +01:00
* prevent internal errors when calling location_force_mem() for
dynamic or open arrays on the JVM target git-svn-id: branches/jvmbackend@18757 -
This commit is contained in:
parent
eb8ba875db
commit
c648cade1a
@ -1935,6 +1935,7 @@ implementation
|
|||||||
procedure thlcgobj.location_force_mem(list: TAsmList; var l: tlocation; size: tdef);
|
procedure thlcgobj.location_force_mem(list: TAsmList; var l: tlocation; size: tdef);
|
||||||
var
|
var
|
||||||
r : treference;
|
r : treference;
|
||||||
|
forcesize: aint;
|
||||||
begin
|
begin
|
||||||
case l.loc of
|
case l.loc of
|
||||||
LOC_FPUREGISTER,
|
LOC_FPUREGISTER,
|
||||||
@ -1959,7 +1960,12 @@ implementation
|
|||||||
LOC_REGISTER,
|
LOC_REGISTER,
|
||||||
LOC_CREGISTER :
|
LOC_CREGISTER :
|
||||||
begin
|
begin
|
||||||
tg.gethltemp(list,size,size.size,tt_normal,r);
|
if not is_dynamic_array(size) and
|
||||||
|
not is_open_array(size) then
|
||||||
|
forcesize:=size.size
|
||||||
|
else
|
||||||
|
forcesize:=voidpointertype.size;
|
||||||
|
tg.gethltemp(list,size,forcesize,tt_normal,r);
|
||||||
a_load_loc_ref(list,size,size,l,r);
|
a_load_loc_ref(list,size,size,l,r);
|
||||||
location_reset_ref(l,LOC_REFERENCE,l.size,0);
|
location_reset_ref(l,LOC_REFERENCE,l.size,0);
|
||||||
l.reference:=r;
|
l.reference:=r;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user