1; RUN: llvm-as %s -o %t.o
2; RUN: llvm-as %p/Inputs/libcall-truncsfhf2.ll -o %t.truncsfhf2.o
3; RUN: rm -f %t.a
4; RUN: llvm-ar rcs %t.a %t.truncsfhf2.o
5; RUN: not wasm-ld --export-all %t.o %t.a -o %t.wasm 2>&1 | FileCheck %s
6
7target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
8target triple = "wasm32-unknown-unknown"
9
10@g_float = global float 0.0
11@g_half = global half 0.0
12
13define void @_start() {
14  %val1 = load float, float* @g_float
15  %v0 = fptrunc float %val1 to half
16  store half %v0, half* @g_half
17  ret void
18}
19
20; CHECK: wasm-ld: error: {{.*}}truncsfhf2.o): attempt to add bitcode file after LTO.
21