For PR411:
[oota-llvm.git] / test / Transforms / FunctionResolve / 2003-10-21-GlobalResolveHack.ll
1 ; This tests a hack put into place specifically for the C++ libstdc++ library.
2 ; It uses an ugly hack which is cleaned up by the funcresolve pass.
3 ;
4 ; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | grep @X | grep '{'
5
6 @X = external global { i32 }
7 @X = global [ 4 x i8 ] zeroinitializer
8
9 define i32* @test() {
10   %P = getelementptr {i32}* @X, i64 0, i32 0
11   ret i32* %P
12 }