mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-24 18:09:16 +02:00
* we have to be able to take the address of an "absolute" variable
expression (necessary to, a.o., reject absolute mappings to fields of bitpacked records and to bitpacked array elements) git-svn-id: trunk@12874 -
This commit is contained in:
parent
e0a5de2280
commit
c4bedeb9df
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7939,6 +7939,7 @@ tests/test/tprec20.pp svneol=native#text/plain
|
||||
tests/test/tprec21.pp svneol=native#text/plain
|
||||
tests/test/tprec22.pp svneol=native#text/plain
|
||||
tests/test/tprec23.pp svneol=native#text/plain
|
||||
tests/test/tprec24.pp svneol=native#text/plain
|
||||
tests/test/tprec3.pp svneol=native#text/plain
|
||||
tests/test/tprec4.pp svneol=native#text/plain
|
||||
tests/test/tprec5.pp svneol=native#text/plain
|
||||
|
@ -1052,6 +1052,10 @@ implementation
|
||||
{ variable }
|
||||
else
|
||||
begin
|
||||
{ we have to be able to take the address of the absolute
|
||||
expression
|
||||
}
|
||||
valid_for_addr(pt,true);
|
||||
{ remove subscriptn before checking for loadn }
|
||||
hp:=pt;
|
||||
while (hp.nodetype in [subscriptn,typeconvn,vecn]) do
|
||||
|
12
tests/test/tprec24.pp
Normal file
12
tests/test/tprec24.pp
Normal file
@ -0,0 +1,12 @@
|
||||
{ %fail }
|
||||
|
||||
type
|
||||
ta = bitpacked record
|
||||
a, b, c, d: 0..15;
|
||||
end;
|
||||
var
|
||||
c: ta;
|
||||
d: byte absolute c.a;
|
||||
begin
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user