[llvm-commits] CVS: llvm/test/Regression/CFrontend/2004-03-09-LargeArrayInitializers.c

Chris Lattner lattner at cs.uiuc.edu
Tue Mar 9 21:08:01 PST 2004


Changes in directory llvm/test/Regression/CFrontend:

2004-03-09-LargeArrayInitializers.c added (r1.1)

---
Log message:

New testcase for PR275


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

Index: llvm/test/Regression/CFrontend/2004-03-09-LargeArrayInitializers.c
diff -c /dev/null llvm/test/Regression/CFrontend/2004-03-09-LargeArrayInitializers.c:1.1
*** /dev/null	Tue Mar  9 21:07:55 2004
--- llvm/test/Regression/CFrontend/2004-03-09-LargeArrayInitializers.c	Tue Mar  9 21:07:45 2004
***************
*** 0 ****
--- 1,30 ----
+ // Test that these initializers are handled efficiently
+ 
+ int test(int x) {
+   const int XX[1000] = { 0, 0 };
+   const char S [1000] = "foo";
+ 
+   const int array[] = {
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+      17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 
+    };
+    return array[x];
+ } 





More information about the llvm-commits mailing list