* fixed internalerror in case of dereferencing a loc_(c)subsetreg/ref

(mantis #15812)

git-svn-id: trunk@14925 -
This commit is contained in:
Jonas Maebe 2010-02-19 16:26:36 +00:00
parent 7ef7aea4b0
commit fe5d0b0ef4
3 changed files with 30 additions and 0 deletions

1
.gitattributes vendored
View File

@ -10293,6 +10293,7 @@ tests/webtbs/tw15694.pp svneol=native#text/plain
tests/webtbs/tw15727a.pp svneol=native#text/plain
tests/webtbs/tw15728.pp svneol=native#text/plain
tests/webtbs/tw1573.pp svneol=native#text/plain
tests/webtbs/tw15812.pp svneol=native#text/plain
tests/webtbs/tw1592.pp svneol=native#text/plain
tests/webtbs/tw1617.pp svneol=native#text/plain
tests/webtbs/tw1622.pp svneol=native#text/plain

View File

@ -224,6 +224,8 @@ implementation
location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),resultdef.alignment)
else
location_reset_ref(location,LOC_REFERENCE,def_cgsize(resultdef),1);
if not(left.location.loc in [LOC_CREGISTER,LOC_REGISTER,LOC_CREFERENCE,LOC_REFERENCE,LOC_CONSTANT]) then
location_force_reg(current_asmdata.CurrAsmList,left.location,OS_ADDR,true);
case left.location.loc of
LOC_CREGISTER,
LOC_REGISTER:

27
tests/webtbs/tw15812.pp Normal file
View File

@ -0,0 +1,27 @@
{$mode macpas}
program test;
type
Rec1Ptr = ^Rec1;
Rec1 =
record
case boolean of
False : ( f1: Integer);
True : ( case boolean of
False: ( f2: Integer);
True : ( f3: Integer))
end;
Rec2 =
record
case boolean of
False : ( p1: Rec1Ptr);
True : ( p2: Pointer)
end;
procedure PP( theRec2: Rec2; var theRec1: Rec1);
begin
theRec1 := theRec2.p1^
end;
begin
end.