blob: 50c837a1c2f1fd7d22c40fd5aac90bfc4d30b011 [file] [log] [blame]
Lauro Ramos Venancio81373352008-02-26 21:41:45 +00001// RUN: clang -emit-llvm < %s | grep "g.b = internal global i8. getelementptr"
Devang Patele40daa42007-10-26 17:50:58 +00002
Oliver Hunt28247232007-12-02 00:11:25 +00003struct AStruct {
4 int i;
5 char *s;
6 double d;
7};
8
Devang Patele40daa42007-10-26 17:50:58 +00009void f() {
10 static int i = 42;
Oliver Hunt28247232007-12-02 00:11:25 +000011 static int is[] = { 1, 2, 3, 4 };
12 static char* str = "forty-two";
13 static char* strs[] = { "one", "two", "three", "four" };
14 static struct AStruct myStruct = { 1, "two", 3.0 };
Devang Patele40daa42007-10-26 17:50:58 +000015}
Lauro Ramos Venancio81373352008-02-26 21:41:45 +000016
17void g() {
18 static char a[10];
19 static char *b = a;
20}