* support LOC_(C)SUBSETREG/REF in gen_load_vmt_register() (mantis #22869)

git-svn-id: trunk@22380 -
This commit is contained in:
Jonas Maebe 2012-09-13 12:35:31 +00:00
parent 29c71d39ac
commit 1219797d94
3 changed files with 35 additions and 1 deletions

1
.gitattributes vendored
View File

@ -12825,6 +12825,7 @@ tests/webtbs/tw22744.pp svneol=native#text/pascal
tests/webtbs/tw2277.pp svneol=native#text/plain
tests/webtbs/tw2280.pp svneol=native#text/plain
tests/webtbs/tw22860.pp svneol=native#text/plain
tests/webtbs/tw22869.pp svneol=native#text/plain
tests/webtbs/tw2289.pp svneol=native#text/plain
tests/webtbs/tw2291.pp svneol=native#text/plain
tests/webtbs/tw2294.pp svneol=native#text/plain

View File

@ -2073,7 +2073,11 @@ implementation
LOC_CONSTANT,
LOC_CREGISTER,
LOC_CREFERENCE,
LOC_REFERENCE:
LOC_REFERENCE,
LOC_CSUBSETREG,
LOC_SUBSETREG,
LOC_CSUBSETREF,
LOC_SUBSETREF:
begin
reference_reset_base(href,cg.getaddressregister(list),objdef.vmt_offset,sizeof(pint));
{ todo: pass actual vmt pointer type to hlcg }

29
tests/webtbs/tw22869.pp Normal file
View File

@ -0,0 +1,29 @@
{$mode objfpc}
type
tc = class
procedure test; virtual;
end;
trec = record
c: tc;
end;
procedure tc.test;
begin
end;
procedure doit(r: trec);
begin
r.c.test;
end;
var
r: trec;
c: tc;
begin
c:=tc.create;
r.c:=c;
doit(r);
c.free;
end.