[llvm-commits] CVS: llvm-test/SingleSource/UnitTests/2005-11-29-LongSwitch.c

Chris Lattner lattner at cs.uiuc.edu
Tue Nov 29 10:19:41 PST 2005



Changes in directory llvm-test/SingleSource/UnitTests:

2005-11-29-LongSwitch.c added (r1.1)
---
Log message:

new testcase corresponding to PR671: http://llvm.cs.uiuc.edu/PR671 


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

 2005-11-29-LongSwitch.c |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+)


Index: llvm-test/SingleSource/UnitTests/2005-11-29-LongSwitch.c
diff -c /dev/null llvm-test/SingleSource/UnitTests/2005-11-29-LongSwitch.c:1.1
*** /dev/null	Tue Nov 29 12:19:31 2005
--- llvm-test/SingleSource/UnitTests/2005-11-29-LongSwitch.c	Tue Nov 29 12:19:21 2005
***************
*** 0 ****
--- 1,19 ----
+ // PR671
+ 
+ #include <stdio.h>
+ 
+ int foo(long long v) {
+     switch (v) {
+     case 0:
+         return 1;
+     case -1:
+         return 2;
+     }
+     return 0;
+ }
+ 
+ int main() {
+     int r = foo(4294967295LL);
+     printf("foo = %d\n", r);
+     return r;
+ }






More information about the llvm-commits mailing list