New testcase for infinite loop that the raise pass is getting into
[oota-llvm.git] / test / Transforms / FunctionResolve / retmismatch2.ll
1 ; This shows where the function is called with the prototype indicating a
2 ; return type doesn't exists, but it really does.
3 ;
4 ; RUN: if as < %s | opt -funcresolve
5 ; RUN: then echo "opt ok"
6 ; RUN: else exit 1   # Make sure opt doesn't abort!
7 ; RUN: fi
8 ;
9 ; RUN: if as < %s | opt -funcresolve | dis | grep '\.\.\.' | grep call
10 ; RUN: then exit 1
11 ; RUN: else exit 0
12 ; RUN: fi
13
14 declare void %foo(...)
15
16 int %foo(int %x, float %y) {
17         ret int %x
18 }
19
20 int %bar() {
21         call void (...)* %foo(double 12.5, int 48)
22         ret int 6
23 }