From bce4648a05087e85989f99b0afdab05154b28e4b Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Fri, 23 Mar 2007 07:17:52 +0000 Subject: [PATCH] Test handling of switches with wide case ranges. llvm-svn: 35279 --- test/AdaFrontend/switch.adb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/AdaFrontend/switch.adb 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;