mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 18:09:27 +02:00
* type casting could force class variables into sub registers, so handle them in subscript nodes as well
git-svn-id: trunk@23587 -
This commit is contained in:
parent
209bfaa774
commit
77bbb8b5bc
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -9784,6 +9784,7 @@ tests/tbs/tb0588.pp svneol=native#text/pascal
|
||||
tests/tbs/tb0589.pp svneol=native#text/pascal
|
||||
tests/tbs/tb0590.pp svneol=native#text/pascal
|
||||
tests/tbs/tb0591.pp svneol=native#text/pascal
|
||||
tests/tbs/tb0592.pp svneol=native#text/plain
|
||||
tests/tbs/tb205.pp svneol=native#text/plain
|
||||
tests/tbs/ub0060.pp svneol=native#text/plain
|
||||
tests/tbs/ub0069.pp svneol=native#text/plain
|
||||
|
@ -324,7 +324,12 @@ implementation
|
||||
location.reference.base := left.location.register;
|
||||
end;
|
||||
LOC_CREFERENCE,
|
||||
LOC_REFERENCE:
|
||||
LOC_REFERENCE,
|
||||
{ tricky type casting of parameters can cause these locations, see tb0592.pp on x86_64-linux }
|
||||
LOC_SUBSETREG,
|
||||
LOC_CSUBSETREG,
|
||||
LOC_SUBSETREF,
|
||||
LOC_CSUBSETREF:
|
||||
begin
|
||||
location.reference.base:=cg.getaddressregister(current_asmdata.CurrAsmList);
|
||||
hlcg.a_load_loc_reg(current_asmdata.CurrAsmList,left.resultdef,left.resultdef,left.location,location.reference.base);
|
||||
|
17
tests/tbs/tb0592.pp
Normal file
17
tests/tbs/tb0592.pp
Normal file
@ -0,0 +1,17 @@
|
||||
{$mode objfpc}
|
||||
type
|
||||
TT_Stream = record z : Pointer; end;
|
||||
|
||||
TFreeTypeStream = class
|
||||
FUsed : Boolean;
|
||||
end;
|
||||
|
||||
procedure TT_Done_Stream( stream : TT_Stream );
|
||||
begin
|
||||
if stream.z = nil then exit;
|
||||
TFreeTypeStream(stream.z).FUsed := false;
|
||||
end;
|
||||
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user