[llvm-bugs] [Bug 44046] New: Compiler crash when attempting to build compiler-rt against wasm32-wasi target
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Nov 18 08:47:55 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44046
Bug ID: 44046
Summary: Compiler crash when attempting to build compiler-rt
against wasm32-wasi target
Product: clang
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: rstewart at mozilla.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Created attachment 22834
--> https://bugs.llvm.org/attachment.cgi?id=22834&action=edit
Preprocessed source
Attempting to compile `compiler-rt` on Ubuntu against the `wasm32-wasi` target
with Clang 9 causes a compiler crash. See the attached run script/preprocessed
source file. I also tried a `creduce` run on the source file to attempt to
reduce the crash; the result is also attached.
```
[1/157] /home/rstewart/src/clang/bin/clang --target=wasm32-wasi
--sysroot=/home/rstewart/src/wasi-sdk/opt/wasi-sdk/share/wasi-sysroot
-DVISIBILITY_HIDDEN -O1 -O2 -g -DNDEBUG -m64 -std=c11 -fno-builtin
-fvisibility=hidden -fomit-frame-pointer -MD -MT
CMakeFiles/clang_rt.builtins-x86_64.dir/fixtfsi.c.obj -MF
CMakeFiles/clang_rt.builtins-x86_64.dir/fixtfsi.c.obj.d -o
CMakeFiles/clang_rt.builtins-x86_64.dir/fixtfsi.c.obj -c
/home/rstewart/src/llvm-project/compiler-rt/lib/builtins/fixtfsi.c
FAILED: CMakeFiles/clang_rt.builtins-x86_64.dir/fixtfsi.c.obj
/home/rstewart/src/clang/bin/clang --target=wasm32-wasi
--sysroot=/home/rstewart/src/wasi-sdk/opt/wasi-sdk/share/wasi-sysroot
-DVISIBILITY_HIDDEN -O1 -O2 -g -DNDEBUG -m64 -std=c11 -fno-builtin
-fvisibility=hidden -fomit-frame-pointer -MD -MT
CMakeFiles/clang_rt.builtins-x86_64.dir/fixtfsi.c.obj -MF
CMakeFiles/clang_rt.builtins-x86_64.dir/fixtfsi.c.obj.d -o
CMakeFiles/clang_rt.builtins-x86_64.dir/fixtfsi.c.obj -c
/home/rstewart/src/llvm-project/compiler-rt/lib/builtins/fixtfsi.c
fatal error: error in backend: Cannot select: 0x673f078: ch = brcond 0x6739d68,
0x673f420, BasicBlock:ch< 0x6733570>,
llvm-project/compiler-rt/lib/builtins/fp_fixint_impl.inc:27:7 @[
llvm-project/compiler-rt/lib/builtins/fixtfsi.c:17:51 ]
0x673f420: i64 = setcc 0x673a790, Constant:i32<0>, setlt:ch,
llvm-project/compiler-rt/lib/builtins/fp_fixint_impl.inc:27:16 @[
llvm-project/compiler-rt/lib/builtins/fixtfsi.c:17:51 ]
0x673a790: i32 = add nsw 0x673a5f0, Constant:i32<-16383>,
llvm-project/compiler-rt/lib/builtins/fp_fixint_impl.inc:23:24 @[
llvm-project/compiler-rt/lib/builtins/fixtfsi.c:17:51 ]
0x673a5f0: i32 = and 0x673f3b8, Constant:i32<32767>,
llvm-project/compiler-rt/lib/builtins/fp_fixint_impl.inc:23:24 @[
llvm-project/compiler-rt/lib/builtins/fixtfsi.c:17:51 ]
0x673f3b8: i32 = truncate 0x673f350,
llvm-project/compiler-rt/lib/builtins/fp_fixint_impl.inc:23:24 @[
llvm-project/compiler-rt/lib/builtins/fixtfsi.c:17:51 ]
0x673f350: i64 = srl 0x6739c98, Constant:i64<48>,
llvm-project/compiler-rt/lib/builtins/fp_fixint_impl.inc:23:30 @[
llvm-project/compiler-rt/lib/builtins/fixtfsi.c:17:51 ]
0x6739c98: i64 = WebAssemblyISD::ARGUMENT TargetConstant:i32<1>
0x6739c30: i32 = TargetConstant<1>
0x6739dd0: i64 = Constant<48>
0x673a588: i32 = Constant<32767>
0x673a728: i32 = Constant<-16383>
0x673ee08: i32 = Constant<0>
In function: __fixtfsi
clang-9: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 9.0.0 (tags/RELEASE_900/final)
Target: wasm64-unknown-wasi
Thread model: posix
InstalledDir: /home/rstewart/src/clang/bin
clang-9: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-9: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /tmp/fixtfsi-0fc7da.c
clang-9: note: diagnostic msg: /tmp/fixtfsi-0fc7da.sh
clang-9: note: diagnostic msg:
********************
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191118/b51ac601/attachment-0001.html>
More information about the llvm-bugs
mailing list