brintos

brintos / llvm-project-archived public Read only

0
0
Text · 639 B · 2650871 Raw
18 lines · c
1/* RUN: %clang_cc1 -std=c89 -emit-llvm -o - %s | FileCheck %s2   RUN: %clang_cc1 -std=c99 -emit-llvm -o - %s | FileCheck %s3   RUN: %clang_cc1 -std=c11 -emit-llvm -o - %s | FileCheck %s4   RUN: %clang_cc1 -std=c17 -emit-llvm -o - %s | FileCheck %s5   RUN: %clang_cc1 -std=c2x -emit-llvm -o - %s | FileCheck %s6 */7 8/* WG14 DR060:9 * Array initialization from a string literal10 */11 12const char str[5] = "foo";13const __typeof__(*L"a") wstr[5] = L"foo";14 15// CHECK: @str = {{.*}}constant [5 x i8] c"foo\00\00"16// CHECK-NEXT: @wstr = {{.*}}constant [5 x i{{16|32}}] [i{{16|32}} 102, i{{16|32}} 111, i{{16|32}} 111,  i{{16|32}} 0, i{{16|32}} 0]17 18