For PR411:
[oota-llvm.git] / test / Transforms / FunctionResolve / 2002-08-19-ResolveGlobalVarsEasier.ll
1 ; Test that: extern int X[]  and int X[] = { 1, 2, 3, 4 } are resolved 
2 ; correctly.  This doesn't have constantexprs
3 ;
4 ; RUN: llvm-as < %s | opt -funcresolve | llvm-dis | not grep external
5 ;
6
7 @X = external global [0 x int]
8 @X = global [4 x int] [ int 1, int 2, int 3, int 4 ]
9
10 implementation   ; Functions:
11
12 int %foo(int %x) {
13 bb1:                                    ;[#uses=0]
14         %G = getelementptr [0 x int]* @X, long 0, long 1
15         store int 5, int* %G
16         %F = getelementptr [0 x int]* @X, long 0, long 2
17         %val = load int* %F
18         ret int %val
19 }
20