1 ; Make sure that functions are removed successfully if they are referred to by
2 ; a global that is dead. Make sure any globals they refer to die as well.
4 ; RUN: llvm-upgrade < %s | llvm-as | opt -globaldce | llvm-dis | not grep foo
6 %b = internal global int ()* %foo ;; Unused, kills %foo
8 %foo = internal global int 7 ;; Should die when function %foo is killed
12 internal int %foo() { ;; dies when %b dies.