1; RUN: llc -filetype=obj %s -o %t.main.o
2; RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown %p/Inputs/ret32.s -o %t.ret32.o
3; RUN: wasm-ld -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-WARN
4; RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.main.o %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-FATAL
5
6; CHECK-WARN: warning: function signature mismatch: ret32
7; CHECK-FATAL: error: function signature mismatch: ret32
8
9target triple = "wasm32-unknown-unknown"
10
11define hidden void @_start() local_unnamed_addr #0 {
12entry:
13  %call = tail call i32 @ret32(i32 1, i64 2, i32 3) #2
14  ret void
15}
16
17declare i32 @ret32(i32, i64, i32) local_unnamed_addr #1
18