summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw11039a.pp
blob: 96728844d21e84161a5015161b063f1450d44eda (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{ %opt=-Xe }
{ %target=win32,win64 }

{$packrecords 16}
{$codealign varmin=16}
{$codealign localmin=16}

type
  rec=record
    v:array[0..511] of byte;
  end;

var
  a,b:longword;
  x:rec;
  y: longword;

begin
  a:=b;
  y:=1;
  writeln(hexstr(@a));
  if ptruint(@a) and $f<>0 then
    begin
      writeln('ERROR in alignment of a');
      halt(1);
    end;
  writeln(hexstr(@b));
  if ptruint(@b) and $f<>0 then
    begin
      writeln('ERROR in alignment of b');
      halt(1);
    end;
  writeln(hexstr(@x));
  if ptruint(@x) and $f<>0 then
    begin
      writeln('ERROR in alignment of x');
      halt(1);
    end;
  writeln(hexstr(@y));
  if ptruint(@y) and $f<>0 then
    begin
      writeln('ERROR in alignment of y');
      halt(1);
    end;
end.