fpc/tests/test/opt/tarmls1.pp
Jonas Maebe 10ae87f11c * fixed LdrLdr2LdrMov optimisation in case the first and second ldr have
a different size (disable it in that case) + test

git-svn-id: trunk@25778 -
2013-10-14 12:49:34 +00:00

24 lines
251 B
ObjectPascal

{ %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.