1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s 2f4a2713aSLionel Sambuc // PR5967 3f4a2713aSLionel Sambuc 4f4a2713aSLionel Sambuc extern void* foo; 5f4a2713aSLionel Sambuc static void* const a = foo; bar()6f4a2713aSLionel Sambucvoid* bar() { return a; } 7f4a2713aSLionel Sambuc 8f4a2713aSLionel Sambuc // CHECK: @_ZL1a = internal global i8* null 9f4a2713aSLionel Sambuc 10f4a2713aSLionel Sambuc // CHECK-LABEL: define internal void @__cxx_global_var_init 11f4a2713aSLionel Sambuc // CHECK: load i8** @foo 12f4a2713aSLionel Sambuc // CHECK: ret void 13f4a2713aSLionel Sambuc 14*0a6a1f1dSLionel Sambuc // CHECK-LABEL: define internal void @_GLOBAL__sub_I_deferred_global_init.cpp 15f4a2713aSLionel Sambuc // CHECK: call void @__cxx_global_var_init() 16f4a2713aSLionel Sambuc // CHECK: ret void 17