brintos

brintos / llvm-project-archived public Read only

0
0
Text · 756 B · 960b4cd Raw
52 lines · c
1// RUN: %clang_cc1 -emit-llvm %s -o %t2 3int A[10] = { 1,2,3,4,5 };4 5 6extern int x[];7void foo(void) { x[0] = 1; }8int x[10];9void bar(void) { 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 init20char string2[4] = "string";  // truncate init21 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(void) {32  static _Bool booltest3 = 4;33}34 35// Scalars in braces.36static int a = { 1 };37 38// References to enums.39enum {40  EnumA, EnumB41};42 43int c[] = { EnumA, EnumB };44 45// Binary operators46int d[] = { EnumA | EnumB };47 48// PR196849static int array[];50static int array[4];51 52