[llvm-commits] CVS: llvm/test/Programs/SingleSource/UnitTests/2002-12-13-MishaTest.c
Chris Lattner
lattner at cs.uiuc.edu
Sat Apr 26 15:45:01 PDT 2003
Changes in directory llvm/test/Programs/SingleSource/UnitTests:
2002-12-13-MishaTest.c added (r1.1)
---
Log message:
Check in an old testcase for a problem reported by misha
---
Diffs of the changes:
Index: llvm/test/Programs/SingleSource/UnitTests/2002-12-13-MishaTest.c
diff -c /dev/null llvm/test/Programs/SingleSource/UnitTests/2002-12-13-MishaTest.c:1.1
*** /dev/null Sat Apr 26 15:44:42 2003
--- llvm/test/Programs/SingleSource/UnitTests/2002-12-13-MishaTest.c Sat Apr 26 15:44:32 2003
***************
*** 0 ****
--- 1,25 ----
+
+ #include <stdio.h>
+ sum(to, from, count)
+ short *to, *from;
+ short count;
+ {
+ int i;
+ for (i = 0; i != count; ++i)
+ *to += *from++;
+ }
+
+ #define NUM 2
+ int main() {
+ short Array[NUM];
+ short Sum = 0;
+ int i;
+
+ for (i = 0; i != NUM; ++i)
+ Array[i] = i;
+
+ sum(&Sum, Array, NUM);
+
+ printf("Sum is %d\n", Sum);
+ return 0;
+ }
More information about the llvm-commits
mailing list