1 ; RUN: llvm-as %s -o %t.o
2 ; RUN: llvm-as %p/Inputs/libcall-truncsfhf2.ll -o %t.truncsfhf2.o
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
7 target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128"
8 target triple = "wasm32-unknown-unknown"
10 @g_float = global float 0.0
11 @g_half = global half 0.0
13 define void @_start() {
14 %val1 = load float, ptr @g_float
15 %v0 = fptrunc float %val1 to half
16 store half %v0, ptr @g_half
20 ; CHECK: wasm-ld: error: {{.*}}truncsfhf2.o): attempt to add bitcode file after LTO.