August 23

not use lto or not in release mode has no problem.

all
1.	Running pass 'Function Pass Manager' on module 'ld-temp.o'.
2.	Running pass 'ARM Instruction Selection' on function '@_onLoop'
 #0 0x00000000025bd168 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x25bd168)
 #1 0x00000000025bcff0 llvm::sys::RunSignalHandlers() (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x25bcff0)
 #2 0x00000000025bd63a (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x25bd63a)
 #3 0x00007f809a15c140 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14140)
 #4 0x000000000182dda3 llvm::DataLayout::getAlignment(llvm::Type*, bool) const (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x182dda3)
 #5 0x0000000002919867 (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x2919867)
 #6 0x0000000001c6fae5 llvm::TargetLowering::LowerCallTo(llvm::TargetLowering::CallLoweringInfo&) const (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1c6fae5)
 #7 0x0000000001c43921 llvm::SelectionDAGBuilder::lowerInvokable(llvm::TargetLowering::CallLoweringInfo&, llvm::BasicBlock const*) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1c43921)
 #8 0x0000000001c425f8 llvm::SelectionDAGBuilder::LowerCallTo(llvm::CallBase const&, llvm::SDValue, bool, llvm::BasicBlock const*) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1c425f8)
 #9 0x0000000001c3cd00 llvm::SelectionDAGBuilder::visitCall(llvm::CallInst const&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1c3cd00)
#10 0x0000000001c3c5fc llvm::SelectionDAGBuilder::visit(llvm::Instruction const&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1c3c5fc)
#11 0x0000000001c3c191 llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, true>, bool&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1c3c191)
#12 0x0000000001c3b047 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1c3b047)
#13 0x0000000001c383a4 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1c383a4)
#14 0x0000000001c37ec1 (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1c37ec1)
#15 0x0000000001ff24da llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1ff24da)
#16 0x0000000001a09037 llvm::FPPassManager::runOnFunction(llvm::Function&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1a09037)
#17 0x0000000001a08d2f llvm::FPPassManager::runOnModule(llvm::Module&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x1a08d2f)
#18 0x0000000002280f04 llvm::legacy::PassManagerImpl::run(llvm::Module&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x2280f04)
#19 0x0000000002b89252 (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x2b89252)
#20 0x0000000002b78ffd llvm::lto::backend(llvm::lto::Config const&, std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, unsigned int, std::__1::unique_ptr<llvm::Module, std::__1::default_delete<llvm::Module> >, llvm::ModuleSummaryIndex&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x2b78ffd)
#21 0x0000000002b780d8 llvm::lto::LTO::runRegularLTO(std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x2b780d8)
#22 0x000000000260879e llvm::lto::LTO::run(std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)>, std::__1::function<std::__1::function<std::__1::unique_ptr<llvm::lto::NativeObjectStream, std::__1::default_delete<llvm::lto::NativeObjectStream> > (unsigned int)> (unsigned int, llvm::StringRef)>) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x260879e)
#23 0x000000000265bfc0 lld::elf::BitcodeCompiler::compile() (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x265bfc0)
#24 0x000000000264ed7c void lld::elf::LinkerDriver::compileBitcodeFiles<llvm::object::ELFType<(llvm::support::endianness)1, false> >() (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x264ed7c)
#25 0x00000000026466e1 void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1, false> >(llvm::opt::InputArgList&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x26466e1)
#26 0x0000000002641287 lld::elf::LinkerDriver::linkerMain(llvm::ArrayRef<char const*>) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x2641287)
#27 0x000000000258c6e9 lld::elf::link(llvm::ArrayRef<char const*>, bool, llvm::raw_ostream&, llvm::raw_ostream&) (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x258c6e9)
#28 0x00000000018fcf91 (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x18fcf91)
#29 0x00000000018fc9c9 main (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x18fc9c9)
#30 0x00007f8099b7bd0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#31 0x000000000340b351 _start (android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64/bin/ld.lld+0x340b351)
clang-12: error: unable to execute command: Segmentation fault
clang-12: error: linker command failed due to signal (use -v to see invocation)
August 26

On Monday, 23 August 2021 at 15:55:43 UTC, workman wrote:

>

not use lto or not in release mode has no problem.

#0 0x00000000036e1803 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/ldc2+0x36e1803)
Error: Error executing /usr/local/bin/ldc2: Illegal instruction