summaryrefslogtreecommitdiff
path: root/tests/test/opt/tarmls1.pp
blob: ab3aa521342fd58287c34b54156d517170cbd3f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ %opt=-O2 }

type
  trec = record
    w: longint;
  end;

function test(var r: trec): byte;

begin
  test:=byte(r.w);
  r.w:=r.w shr 8;
end;

var
  r: trec;
begin
  r.w:=$1234;
  if test(r)<>$34 then
    halt(1);
  if r.w<>$12 then
    halt(2);
end.