blob: 24c8c675b006f75612e8edb341d6aeaeb8e34932 [file] [log] [blame]
Eli Friedman6c6bda32010-01-08 00:50:11 +00001// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2// PR5967
3
4extern void* foo;
5static void* const a = foo;
6void* bar() { return a; }
7
Sean Hunt31455252010-01-24 03:04:27 +00008// CHECK: @_ZL1a = internal global i8* null
Eli Friedman6c6bda32010-01-08 00:50:11 +00009
10// CHECK: define internal void @__cxx_global_var_init
11// CHECK: load i8** @foo
12// CHECK: ret void
13
Daniel Dunbarefb0fa92010-03-20 04:15:41 +000014// CHECK: define internal void @_GLOBAL__I_a
Eli Friedman6c6bda32010-01-08 00:50:11 +000015// CHECK: call void @__cxx_global_var_init()
16// CHECK: ret void