Make sure upgrade doesn't fail on this.
[oota-llvm.git] / test / Feature / forwardreftest.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llvm-ds -o /dev/null -f &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
3 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
4 ; RUN: diff %t1.ll %t2.ll
5
6   %myty = type int 
7   %myfn = type float (int,double,uint,short)
8   type int(%myfn*)
9   type int(int)
10   type int(int(int)*)
11
12   %thisfuncty = type int (int) *
13 implementation
14
15 declare void %F(%thisfuncty, %thisfuncty, %thisfuncty)
16
17 ; This function always returns zero
18 int %zarro(int %Func)
19 begin
20 Startup:
21     add int 0, 10
22     ret int 0 
23 end
24
25 int %test(int) 
26 begin
27     call void %F(%thisfuncty %zarro, %thisfuncty %test, %thisfuncty %foozball)
28     ret int 0
29 end
30
31 int %foozball(int)
32 begin
33     ret int 0
34 end
35