// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -emit-llvm -o - %s | \
// RUN: FileCheck --check-prefix=MACHO %s
// CHECK: @_ZN5test11A1aE ={{.*}} constant i32 10, align 4
// CHECK: @_ZN5test212_GLOBAL__N_11AIiE1xE = internal global i32 0, align 4
// CHECK: @_ZN5test31AIiE1xE = weak_odr global i32 0, comdat, align 4
// CHECK: @_ZGVN5test31AIiE1xE = weak_odr global i64 0, comdat($_ZN5test31AIiE1xE)
// MACHO: @_ZGVN5test31AIiE1xE = weak_odr global i64 0
// MACHO-NOT: comdat
// CHECK: _ZN5test51U2k0E ={{.*}} global i32 0
// CHECK: _ZN5test51U2k1E ={{.*}} global i32 0
// CHECK: _ZN5test51U2k2E ={{.*}} constant i32 76
// CHECK-NOT: test51U2k3E
// CHECK-NOT: test51U2k4E
// PR5564.
// Test that we don't use guards for initializing template static data
// members with internal linkage.
// Test that we don't use threadsafe statics when initializing
// template static data members.
// Test that we can fold member lookup expressions which resolve to static data
// members.
// Test that static data members in unions behave properly.