1// RUN: %clang_cc1 -triple=x86_64-apple-darwin9 -emit-llvm %s -o - | FileCheck %s
2
3extern "C" int printf(...);
4
5static int count;
6
7int func2(int c) { return printf("loading the func2(%d)\n", c); };
8int func1(int c) { return printf("loading the func1(%d)\n", c); }
9
10static int loader_1 = func1(++count);
11// CHECK: call i32 @_Z5func1i
12
13int loader_2 = func2(++count);
14
15static int loader_3 = func1(++count);
16// CHECK: call i32 @_Z5func1i
17
18int main() {}
19
20int loader_4 = func2(++count);
21static int loader_5 = func1(++count);
22int loader_6 = func2(++count);
23// CHECK: call i32 @_Z5func1i
24
25// CHECK-NOT: call i32 @_Z5func1i
26