1 ; RUN: opt -passes=globalopt -S < %s | FileCheck %s
5 @global = internal global ptr null
6 @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @zot, ptr null }]
8 declare ptr @_Znwm(i64)
10 define internal void @widget() {
11 %tmp = tail call ptr @_Znwm(i64 0)
12 store ptr %tmp, ptr @global, align 8
13 call void @baz(ptr @spam)
17 define internal void @spam() {
18 %tmp = load ptr, ptr @global, align 8
22 define internal void @zot() {
23 call void @baz(ptr @widget)
27 declare void @baz(ptr)