1// RUN: %clang_cc1 -emit-llvm %s -o %t 2 3int A[10] = { 1,2,3,4,5 }; 4 5 6extern int x[]; 7void foo() { x[0] = 1; } 8int x[10]; 9void bar() { x[0] = 1; } 10 11 12extern int y[]; 13void *g = y; 14 15int latin_ptr2len (char *p); 16int (*mb_ptr2len) (char *p) = latin_ptr2len; 17 18 19char string[8] = "string"; // extend init 20char string2[4] = "string"; // truncate init 21 22char *test(int c) { 23 static char buf[10]; 24 static char *bufptr = buf; 25 26 return c ? buf : bufptr; 27} 28 29 30_Bool booltest = 0; 31void booltest2() { 32 static _Bool booltest3 = 4; 33} 34 35// Scalars in braces. 36static int a = { 1 }; 37 38// References to enums. 39enum { 40 EnumA, EnumB 41}; 42 43int c[] = { EnumA, EnumB }; 44 45// Binary operators 46int d[] = { EnumA | EnumB }; 47 48// PR1968 49static int array[]; 50static int array[4]; 51 52