mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 10:49:29 +02:00
* fixed internalerror in case of dereferencing a loc_(c)subsetreg/ref
(mantis #15812) git-svn-id: trunk@14925 -
This commit is contained in:
parent
7ef7aea4b0
commit
fe5d0b0ef4
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
27
tests/webtbs/tw15812.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user