New testcase for PR275
authorChris Lattner <sabre@nondot.org>
Wed, 10 Mar 2004 03:07:45 +0000 (03:07 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 10 Mar 2004 03:07:45 +0000 (03:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12266 91177308-0d34-0410-b5e6-96231b3b80d8

test/CFrontend/2004-03-09-LargeArrayInitializers.c [new file with mode: 0644]

diff --git a/test/CFrontend/2004-03-09-LargeArrayInitializers.c b/test/CFrontend/2004-03-09-LargeArrayInitializers.c
new file mode 100644 (file)
index 0000000..89dc72e
--- /dev/null
@@ -0,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];
+}