mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
bf08e82d8e
llvm-svn: 79992
33 lines
1.6 KiB
C
33 lines
1.6 KiB
C
// RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
|
|
|
|
// 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];
|
|
}
|