aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/staticinit.c
blob: e226179768caf96d0544cdaa1177b146bdefa4ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: clang -emit-llvm %s

struct AStruct { 
	int i;
	char *s;
	double d;
};

void f() {
  static int i = 42;
  static int is[] = { 1, 2, 3, 4 };
  static char* str = "forty-two";
  static char* strs[] = { "one", "two", "three", "four" };
  static struct AStruct myStruct = { 1, "two", 3.0 };
}