OSDN Git Service

[SubZero] lower float and double constants for MIPS
[android-x86/external-swiftshader.git] / tests_lit / parse_errs / call-fcn-bad-return-type.ll
1 ; Test that even if a call return type matches its declaration, it must still be
2 ; a legal call return type (unless declaration is intrinsic).
3
4 ; REQUIRES: no_minimal_build
5
6 ; RUN: %p2i --expect-fail -i %s --insts --args \
7 ; RUN:      -allow-externally-defined-symbols | FileCheck %s
8
9 declare i32 @f();
10
11 declare i64 @g();
12
13 define void @Test(i32 %ifcn) {
14 entry:
15   %fcn =  inttoptr i32 %ifcn to i1()*
16   %v = call i1 %fcn()
17 ; CHECK: Return type of function is invalid: i1
18   ret void
19 }