Skip to content

Compiler crash on 32bit glibc: Do not know how to soften this operator's operand! #146259

Open
@KyunLFA

Description

@KyunLFA

On Azanella Clang branch of glibc (a branch made to further compilation on Clang), I get the following compiler crash when building the 32bit component:

fatal error: error in backend: Do not know how to soften this operator's operand!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /usr/bin/clang -m32 -std=gnu11 -fgnu89-inline -O1 -g3 -Wall -Wwrite-strings -Wundef -Wimplicit-fallthrough -fmerge-all-constants -frounding-math -ftrapping-math -fno-stack-protector -fno-common -Wstrict-prototypes -Wold-style-definition -fmath-errno -fPIE -ftls-model=initial-exec -DDEBUG -U_FORTIFY_SOURCE -I../include -I/home/deck/.cache/paru/clone/glibc-git/src/lib32-glibc-build/stdlib -I/home/deck/.cache/paru/clone/glibc-git/src/lib32-glibc-build -I../sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/i386/i686/nptl -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/x86/include -I../sysdeps/unix/sysv/linux/x86 -I../sysdeps/x86/nptl -I../sysdeps/i386/nptl -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu/multiarch -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686/multiarch -I../sysdeps/i386/i686 -I../sysdeps/i386/fpu -I../sysdeps/x86/fpu -I../sysdeps/i386 -I../sysdeps/x86/include -I../sysdeps/x86 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/float128 -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic -I.. -I../libio -I. -nostdinc -isystem /usr/lib/clang/20/include -isystem /usr/include -D_LIBC_REENTRANT -include /home/deck/.cache/paru/clone/glibc-git/src/lib32-glibc-build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h -DPIC -DTOP_NAMESPACE=glibc -c -MD -MP -MF /home/deck/.cache/paru/clone/glibc-git/src/lib32-glibc-build/stdlib/strtof128_l.o.dt -MT /home/deck/.cache/paru/clone/glibc-git/src/lib32-glibc-build/stdlib/strtof128_l.o -fcolor-diagnostics -o /home/deck/.cache/paru/clone/glibc-git/src/lib32-glibc-build/stdlib/strtof128_l.o ../sysdeps/ieee754/float128/strtof128_l.c
1.	<eof> parser at end of file
2.	Code generation
3.	Running pass 'Function Pass Manager' on module '../sysdeps/ieee754/float128/strtof128_l.c'.
4.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@round_and_return'
 #0 0x00007fdc51be6fc9 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/../lib/libLLVM.so.20.1+0x33e6fc9)
 #1 0x00007fdc51be5e30 llvm::sys::RunSignalHandlers() (/usr/bin/../lib/libLLVM.so.20.1+0x33e5e30)
 #2 0x00007fdc51b01800 (/usr/bin/../lib/libLLVM.so.20.1+0x3301800)
 #3 0x00007fdc51b01739 (/usr/bin/../lib/libLLVM.so.20.1+0x3301739)
 #4 0x00007fdc51bdf8cd (/usr/bin/../lib/libLLVM.so.20.1+0x33df8cd)
 #5 0x000056444955fa3e (/usr/bin/clang+0x13a3e)
 #6 0x00007fdc51b1540a llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/bin/../lib/libLLVM.so.20.1+0x331540a)
 #7 0x00007fdc51b152c6 (/usr/bin/../lib/libLLVM.so.20.1+0x33152c6)
 #8 0x00007fdc527603d1 (/usr/bin/../lib/libLLVM.so.20.1+0x3f603d1)
 #9 0x00007fdc52764c7c llvm::SelectionDAG::LegalizeTypes() (/usr/bin/../lib/libLLVM.so.20.1+0x3f64c7c)
#10 0x00007fdc528b7262 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/usr/bin/../lib/libLLVM.so.20.1+0x40b7262)
#11 0x00007fdc528b66b0 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/usr/bin/../lib/libLLVM.so.20.1+0x40b66b0)
#12 0x00007fdc528b3902 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/usr/bin/../lib/libLLVM.so.20.1+0x40b3902)
#13 0x00007fdc547418e7 (/usr/bin/../lib/libLLVM.so.20.1+0x5f418e7)
#14 0x00007fdc528b2bd4 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/usr/bin/../lib/libLLVM.so.20.1+0x40b2bd4)
#15 0x00007fdc52225a56 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/usr/bin/../lib/libLLVM.so.20.1+0x3a25a56)
#16 0x00007fdc51e62e7e llvm::FPPassManager::runOnFunction(llvm::Function&) (/usr/bin/../lib/libLLVM.so.20.1+0x3662e7e)
#17 0x00007fdc51e62843 llvm::FPPassManager::runOnModule(llvm::Module&) (/usr/bin/../lib/libLLVM.so.20.1+0x3662843)
#18 0x00007fdc51e6c5a7 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/usr/bin/../lib/libLLVM.so.20.1+0x366c5a7)
#19 0x00007fdc590ba2d7 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/usr/bin/../lib/libclang-cpp.so.20.1+0x2cba2d7)
#20 0x00007fdc59574f71 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/bin/../lib/libclang-cpp.so.20.1+0x3174f71)
#21 0x00007fdc57a74229 clang::ParseAST(clang::Sema&, bool, bool) (/usr/bin/../lib/libclang-cpp.so.20.1+0x1674229)
#22 0x00007fdc5a44055d clang::FrontendAction::Execute() (/usr/bin/../lib/libclang-cpp.so.20.1+0x404055d)
#23 0x00007fdc5a3abb30 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/bin/../lib/libclang-cpp.so.20.1+0x3fabb30)
#24 0x00007fdc5a4dd8fe clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/bin/../lib/libclang-cpp.so.20.1+0x40dd8fe)
#25 0x000056444955f3db cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+0x133db)
#26 0x000056444955a519 (/usr/bin/clang+0xe519)
#27 0x00007fdc59f10f19 (/usr/bin/../lib/libclang-cpp.so.20.1+0x3b10f19)
#28 0x00007fdc51b0171b llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/bin/../lib/libLLVM.so.20.1+0x330171b)
#29 0x00007fdc59f10e7f clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (/usr/bin/../lib/libclang-cpp.so.20.1+0x3b10e7f)
#30 0x00007fdc59ed68d5 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/bin/../lib/libclang-cpp.so.20.1+0x3ad68d5)
#31 0x00007fdc59ed6b67 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/bin/../lib/libclang-cpp.so.20.1+0x3ad6b67)
#32 0x00007fdc59f0be98 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/bin/../lib/libclang-cpp.so.20.1+0x3b0be98)
#33 0x0000564449559daa clang_main(int, char**, llvm::ToolContext const&) (/usr/bin/clang+0xddaa)
#34 0x0000564449569798 main (/usr/bin/clang+0x1d798)
#35 0x00007fdc4e2862d9 (/usr/bin/../lib/libc.so.6+0x852d9)
#36 0x00007fdc4e28624c __libc_start_main (/usr/bin/../lib/libc.so.6+0x8524c)
#37 0x0000564449557e81 _start (/usr/bin/clang+0xbe81)
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 20.1.7 (https://github.com/llvm/llvm-project.git 6146a88f60492b520a36f8f8f3231e15f3cc6082)
Target: i386-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/strtof128_l-0ccd71.c
clang: note: diagnostic msg: /tmp/strtof128_l-0ccd71.sh
clang: note: diagnostic msg: 

********************
make[2]: *** [/home/deck/.cache/paru/clone/glibc-git/src/lib32-glibc-build/sysd-rules:825: /home/deck/.cache/paru/clone/glibc-git/src/lib32-glibc-build/stdlib/strtof128_l.o] Error 1
make[2]: Leaving directory '/home/deck/.cache/paru/clone/glibc-git/src/glibc/stdlib'
make[2]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/home/deck/.cache/paru/clone/glibc-git/src/glibc/stdlib'

strtof128_l-0ccd71.zip

Configure args:
--host=i686-pc-linux-gnu --libdir=/usr/lib32 --libexecdir=/usr/lib32 --prefix=/usr --with-headers=/usr/include --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/glibc/-/issues --enable-kernel=6.16 --enable-systemtap --disable-nscd --disable-profile --disable-werror

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:X86crashPrefer [crash-on-valid] or [crash-on-invalid]llvm:SelectionDAGSelectionDAGISel as well

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions