fpc/tests/test/opt/tdfa20.pp
2019-05-18 12:01:41 +00:00

23 lines
338 B
ObjectPascal

{ %OPT=-Oodfa -vw -Sew -vm6060 }
{ %FAIL }
{$mode objfpc}
program project1;
type
trange=0..5;
function f(r: trange): longint;
begin
{ must give a warning about unset function result; warning about incomplete
case statement is suppressed with -vm6060 }
case r of
0..4: result:=r;
end;
end;
begin
writeln(f(2));
end.