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.