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