blob: 265206fabb6648ca2da246efbe147a54ef3e0fe8 [file] [log] [blame]
Dan Gohmanfea1dd02009-08-25 15:38:29 +00001// RUN: %llvmgcc -S %s -o - | llvm-as -o /dev/null
Tanya Lattnere9af5d12004-11-06 22:41:00 +00002
Chris Lattner0b67f042004-03-10 03:07:45 +00003// Test that these initializers are handled efficiently
4
5int test(int x) {
6 const int XX[1000] = { 0, 0 };
7 const char S [1000] = "foo";
8
9 const int array[] = {
10 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
11 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
12 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
13 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
14 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
15 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
16 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
17 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
18 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
19 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
20 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
21 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
22 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
23 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
24 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
25 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
26 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
27 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
28 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
29 17, 23, 123, 123, 49, 17, 23, 123, 123, 49, 17, 23, 123, 123, 49,
30 };
31 return array[x];
32}