Add testcase for constantexpr gep
[oota-llvm.git] / test / Transforms / FunctionResolve / 2003-04-18-ForwardDeclGlobal.ll
1 ; RUN: if as < %s | opt -funcresolve -disable-output 2>&1 | grep WARNING
2 ; RUN: then exit 1
3 ; RUN: else exit 0
4 ; RUN: fi
5 %__popcount_tab = external constant [0 x ubyte]
6 %__popcount_tab = constant [4 x ubyte] c"\00\01\01\02"
7
8 declare void %foo(ubyte *)
9
10 void %test() {
11         getelementptr [0 x ubyte]* %__popcount_tab, long 0, long 2
12         getelementptr [4 x ubyte]* %__popcount_tab, long 0, long 2
13         call void %foo(ubyte * getelementptr ([0 x ubyte]* %__popcount_tab, long 0, long 2))
14         ret void
15 }
16