blob: 4e3dc69514e5ac9ec2bae95fe5bf5fe555ea486d [file] [log] [blame]
Dan Gohman830661c2008-08-13 21:22:48 +00001; RUN: llvm-as < %s > %t.bc
2; RUN: llvm-ld %t.bc -o %t.sh
3; PR2612
4
5@current_foo = internal global { } zeroinitializer
6
7define i32 @main(...) {
8entry:
9 %retval = alloca i32 ; <i32*> [#uses=2]
10 store i32 0, i32* %retval
11 %local_foo = alloca { } ; <{ }*> [#uses=1]
12 load { }* @current_foo ; <{ }>:0 [#uses=1]
13 store { } %0, { }* %local_foo
14 br label %return
15
16return: ; preds = %entry
17 load i32* %retval ; <i32>:1 [#uses=1]
18 ret i32 %1
19}
20