mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 21:29:43 +02:00
26 lines
452 B
ObjectPascal
26 lines
452 B
ObjectPascal
{ %OPT=-O4 }
|
|
{$mode objfpc}
|
|
function ShiftPM(x: single): single; noinline;
|
|
begin
|
|
result := x + 10.0 - 1.0;
|
|
end;
|
|
|
|
function ShiftMP(x: single): single; noinline;
|
|
begin
|
|
result := x - 1.0 + 10.0;
|
|
end;
|
|
|
|
begin
|
|
if ShiftPM(5.0) <> 14.0 then
|
|
begin
|
|
writeln('ShiftPM: got ', ShiftPM(5.0):0:1, ', expected 14.0.');
|
|
halt(1);
|
|
end;
|
|
|
|
if ShiftMP(5.0) <> 14.0 then
|
|
begin
|
|
writeln('ShiftMP: got ', ShiftMP(5.0):0:1, ', expected 14.0.');
|
|
halt(2);
|
|
end;
|
|
end.
|