[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / global-with-initialiser.c
blob27d209e0ad09c34a5221c067299a1f8dc134dd81
1 // RUN: %clang_cc1 -emit-llvm %s -o %t
3 const int globalInt = 1;
4 int globalIntWithFloat = 1.5f;
5 int globalIntArray[5] = { 1, 2 };
6 int globalIntFromSizeOf = sizeof(globalIntArray);
7 char globalChar = 'a';
8 char globalCharArray[5] = { 'a', 'b' };
9 float globalFloat = 1.0f;
10 float globalFloatWithInt = 1;
11 float globalFloatArray[5] = { 1.0f, 2.0f };
12 double globalDouble = 1.0;
13 double globalDoubleArray[5] = { 1.0, 2.0 };
14 char *globalString = "abc";
15 char *globalStringArray[5] = { "123", "abc" };
16 long double globalLongDouble = 1;
17 long double globalLongDoubleArray[5] = { 1.0, 2.0 };
19 struct Struct {
20 int member1;
21 float member2;
22 char *member3;
25 struct Struct globalStruct = { 1, 2.0f, "foobar"};