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