From: Duncan Sands Date: Fri, 23 Mar 2007 07:17:52 +0000 (+0000) Subject: Test handling of switches with wide case ranges. X-Git-Tag: android-x86-6.0-r1~1003^2~36300 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b819a2b5fef660298b4f38ce951dd7f679f66b4f;p=android-x86%2Fexternal-llvm.git Test handling of switches with wide case ranges. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35279 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/AdaFrontend/switch.adb b/test/AdaFrontend/switch.adb new file mode 100644 index 00000000000..0eb20b22cb4 --- /dev/null +++ b/test/AdaFrontend/switch.adb @@ -0,0 +1,12 @@ +-- RUN: %llvmgcc -c %s -o /dev/null +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;