xref: /llvm-project/lld/test/wasm/fatal-warnings.s (revision 70aa11187e5c7ecca327356569dbb2e56f06cbe0)
1# RUN: llvm-mc -filetype=obj -triple=wasm32-unknown-unknown -o %t.o %s
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.o %t.ret32.o 2>&1 | FileCheck %s -check-prefix=CHECK-WARN
4# RUN: not wasm-ld --fatal-warnings -o %t.wasm %t.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
9.functype ret32 (f32, i64, i32) -> (i32)
10
11.globl  _start
12_start:
13  .functype _start () -> ()
14  f32.const 1.0
15  i64.const 2
16  i32.const 3
17  call ret32
18  drop
19  end_function
20