[llvm-commits] CVS: llvm/test/AdaFrontend/switch.adb

Duncan Sands baldrick at free.fr
Fri Mar 23 00:18:37 PDT 2007



Changes in directory llvm/test/AdaFrontend:

switch.adb added (r1.1)
---
Log message:

Test handling of switches with wide case ranges.


---
Diffs of the changes:  (+12 -0)

 switch.adb |   12 ++++++++++++
 1 files changed, 12 insertions(+)


Index: llvm/test/AdaFrontend/switch.adb
diff -c /dev/null llvm/test/AdaFrontend/switch.adb:1.1
*** /dev/null	Fri Mar 23 02:18:03 2007
--- llvm/test/AdaFrontend/switch.adb	Fri Mar 23 02:17:52 2007
***************
*** 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;






More information about the llvm-commits mailing list