diff options
author | Chris Lattner <sabre@nondot.org> | 2004-03-10 03:07:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-03-10 03:07:45 +0000 |
commit | 0b67f04a1c6f778c4f3fd7311ffe8b518a810351 (patch) | |
tree | 666997d06ecf0c4326b05e43142a6181a8e1e71a /test/CFrontend | |
parent | c1a5bacea83bd35f6407127cbbeb53f8103df8c4 (diff) | |
download | external_llvm-0b67f04a1c6f778c4f3fd7311ffe8b518a810351.zip external_llvm-0b67f04a1c6f778c4f3fd7311ffe8b518a810351.tar.gz external_llvm-0b67f04a1c6f778c4f3fd7311ffe8b518a810351.tar.bz2 |
New testcase for PR275
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12266 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CFrontend')
-rw-r--r-- | test/CFrontend/2004-03-09-LargeArrayInitializers.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/CFrontend/2004-03-09-LargeArrayInitializers.c b/test/CFrontend/2004-03-09-LargeArrayInitializers.c new file mode 100644 index 0000000..89dc72e --- /dev/null +++ b/test/CFrontend/2004-03-09-LargeArrayInitializers.c @@ -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]; +} |