* 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:
Jonas Maebe 2009-03-12 20:12:14 +00:00
parent e0a5de2280
commit c4bedeb9df
3 changed files with 17 additions and 0 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
View 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.