1 // RUN: %clang_cc1 -triple i386-unknown-unknown -x c++ -emit-llvm -o - %s | FileCheck %s
3 union _u
{ char a
[]; } u
= {};
4 union _u0
{ char a
[]; } u0
= {0};
6 // CHECK: %union._u = type { [0 x i8] }
8 // CHECK: @u = global %union._u zeroinitializer, align 1
9 // CHECK: @u0 = global { [1 x i8] } zeroinitializer, align 1
11 union { char a
[]; } z
= {};
12 // CHECK: @z = internal global %union.{{.*}} zeroinitializer, align 1
13 union { char a
[]; } z0
= {0};
14 // CHECK: @z0 = internal global { [1 x i8] } zeroinitializer, align 1
16 /* C++ requires global anonymous unions have static storage, so we have to
17 reference them to keep them in the IR output. */