llvm-project/llvm/test/FrontendAda/switch.adb

13 lines
237 B
Ada
Raw Normal View History

-- RUN: %llvmgcc -c %s
2007-04-04 05:46:22 +08:00
function Switch (N : Integer) return Integer is
begin
case N is
when Integer'First .. -1 =>
return -1;
when 0 =>
return 0;
when others =>
return 1;
end case;
end;