fpc/tests/test/tparray25.pp
Jonas Maebe 10341eabaa * don't allow taking the address of ordinal bitpacked array elements
whose size is not a power of two
  + some more packed array/record tests

git-svn-id: trunk@7610 -
2007-06-09 18:13:04 +00:00

19 lines
219 B
ObjectPascal

type
tstr = string[2];
pstr = ^tstr;
tarr = bitpacked array[0..20] of tstr;
procedure p(a: pstr);
begin
a^ := 'ab';
end;
var
a: tarr;
begin
a[0]:='gh';
p(@a[0]);
if (a[0]<>'ab') then
halt(1);
end.