blob: 27d209e0ad09c34a5221c067299a1f8dc134dd81 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -emit-llvm %s -o %t
Chris Lattner75cf2882007-11-23 22:07:55 +00002
3const int globalInt = 1;
4int globalIntWithFloat = 1.5f;
5int globalIntArray[5] = { 1, 2 };
6int globalIntFromSizeOf = sizeof(globalIntArray);
7char globalChar = 'a';
8char globalCharArray[5] = { 'a', 'b' };
9float globalFloat = 1.0f;
10float globalFloatWithInt = 1;
11float globalFloatArray[5] = { 1.0f, 2.0f };
12double globalDouble = 1.0;
13double globalDoubleArray[5] = { 1.0, 2.0 };
14char *globalString = "abc";
15char *globalStringArray[5] = { "123", "abc" };
16long double globalLongDouble = 1;
17long double globalLongDoubleArray[5] = { 1.0, 2.0 };
18
19struct Struct {
Mike Stump1eb44332009-09-09 15:08:12 +000020 int member1;
21 float member2;
22 char *member3;
Chris Lattner75cf2882007-11-23 22:07:55 +000023};
24
25struct Struct globalStruct = { 1, 2.0f, "foobar"};