summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw17862.pp
blob: bd0cfa7d4b416c7611f01a67c964cecb8f044279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{$mode objfpc}
type
 TField = record
   a,b,c: byte;
 end;
 tarray = bitpacked array[0..3] of tfield;

procedure test(var a: tfield);
begin
  if a.a<>3 then
    halt(1);
  if a.b<>4 then
    halt(2);
  if a.c<>5 then
    halt(3);
end;

var
  a: tarray;
begin
  a[1].a:=3;
  a[1].b:=4;
  a[1].c:=5;
  test(a[1]);
end.