[llvm-bugs] [Bug 45419] New: fatal error: error in backend: Unable to insert indirect branch compiling NVPTXInstPrinter.cpp for riscv64

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Apr 3 09:04:52 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45419

            Bug ID: 45419
           Summary: fatal error: error in backend: Unable to insert
                    indirect branch compiling NVPTXInstPrinter.cpp for
                    riscv64
           Product: clang
           Version: 10.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: andrew at ziglang.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

downstream bug report: https://github.com/ziglang/bootstrap/issues/4

fatal error: error in backend: Unable to insert indirect branch
Stack dump:
0.      Program arguments: /home/andy/dev/bootstrap-zig/out/host/bin/zig clang
-c -nostdinc -fno-spell-checking -isystem
/home/andy/dev/bootstrap-zig/out/host/lib/zig/libcxx/include
-D_LIBCPP_HAS_MUSL_LIBC -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -target riscv64-unknown-linux-musl
-isystem /home/andy/dev/bootstrap-zig/out/host/lib/zig/include -isystem
/home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/riscv64-linux-musl
-isystem
/home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/generic-musl
-isystem
/home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/riscv64-linux-any
-isystem
/home/andy/dev/bootstrap-zig/out/host/lib/zig/libc/include/any-linux-any
-Xclang -target-feature -Xclang
+64bit,+a,+c,+d,-e,+f,+m,-relax,-reserve-x1,-reserve-x10,-reserve-x11,-reserve-x12,-reserve-x13,-reserve-x14,-reserve-x15,-reserve-x16,-reserve-x17,-reserve-x18,-reserve-x19,-reserve-x2,-reserve-x20,-reserve-x21,-reserve-x22,-reserve-x23,-reserve-x24,-reserve-x25,-reserve-x26,-reserve-x27,-reserve-x28,-reserve-x29,-reserve-x3,-reserve-x30,-reserve-x31,-reserve-x4,-reserve-x5,-reserve-x6,-reserve-x7,-reserve-x8,-reserve-x9,-rvc-hints
-MD -MV -MF zig-cache/tmp/xq3RKAPzCgm1-NVPTXInstPrinter.o.d -mno-relax
-fno-omit-frame-pointer -fsanitize=undefined -fsanitize-trap=undefined -D_DEBUG
-Og -fstack-protector-strong --param ssp-buffer-size=4 -fPIC -DGTEST_HAS_RTTI=0
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/home/andy/dev/bootstrap-zig/out/build-llvm-riscv64-linux-musl/lib/Target/NVPTX/MCTargetDesc
-I/home/andy/dev/bootstrap-zig/llvm/lib/Target/NVPTX/MCTargetDesc
-I/home/andy/dev/bootstrap-zig/llvm/lib/Target/NVPTX
-I/home/andy/dev/bootstrap-zig/out/build-llvm-riscv64-linux-musl/lib/Target/NVPTX
-I/home/andy/dev/bootstrap-zig/out/build-llvm-riscv64-linux-musl/include
-I/home/andy/dev/bootstrap-zig/llvm/include -fvisibility-inlines-hidden
-Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers
-pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default
-Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor
-Wstring-conversion -ffunction-sections -fdata-sections -O3 -DNDEBUG
-fvisibility=hidden -fno-exceptions -fno-rtti -std=c++14 -o
zig-cache/tmp/xq3RKAPzCgm1-NVPTXInstPrinter.o
/home/andy/dev/bootstrap-zig/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module
'/home/andy/dev/bootstrap-zig/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp'.
4.      Running pass 'Branch relaxation pass' on function
'@_ZN4llvm16NVPTXInstPrinter16printInstructionEPKNS_6MCInstEmRNS_11raw_ostreamE'
 #0 0x00000000058a4cea llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x58a4cea)
 #1 0x00000000058a2a54 llvm::sys::RunSignalHandlers()
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x58a2a54)
 #2 0x00000000058a2ce1 llvm::sys::CleanupOnSignal(unsigned long)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x58a2ce1)
 #3 0x00000000057e1864 llvm::CrashRecoveryContext::HandleExit(int)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x57e1864)
 #4 0x000000000589bc27 llvm::sys::Process::Exit(int)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x589bc27)
 #5 0x0000000000c31f33 LLVMErrorHandler(void*, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc31f33)
 #6 0x00000000057e8a87 llvm::report_fatal_error(llvm::Twine const&, bool)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x57e8a87)
 #7 0x00000000057e8bd0
llvm::report_fatal_error(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x57e8bd0)
 #8 0x0000000003605384
llvm::RISCVInstrInfo::insertIndirectBranch(llvm::MachineBasicBlock&,
llvm::MachineBasicBlock&, llvm::DebugLoc const&, long, llvm::RegScavenger*)
const (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x3605384)
 #9 0x00000000047a99db (anonymous
namespace)::BranchRelaxation::runOnMachineFunction(llvm::MachineFunction&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x47a99db)
#10 0x00000000048c5474
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x48c5474)
#11 0x000000000557b6b8 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x557b6b8)
#12 0x000000000557cc51 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x557cc51)
#13 0x000000000557d008 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x557d008)
#14 0x0000000000c9996c clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc9996c)
#15 0x0000000000c4bd81
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc4bd81)
#16 0x00000000027215e1 clang::ParseAST(clang::Sema&, bool, bool)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x27215e1)
#17 0x000000000112a1a9 clang::FrontendAction::Execute()
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x112a1a9)
#18 0x00000000010e5a03
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x10e5a03)
#19 0x0000000000c3d94b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc3d94b)
#20 0x0000000000c326ca cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc326ca)
#21 0x0000000000c2d262 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc2d262)
#22 0x000000000122d275 void llvm::function_ref<void
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const::'lambda'()>(long)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x122d275)
#23 0x00000000057e16f3
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x57e16f3)
#24 0x000000000122de6e
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (.part.0)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x122de6e)
#25 0x0000000001204f38
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x1204f38)
#26 0x0000000001205839
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x1205839)
#27 0x000000000120d5ef
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x120d5ef)
#28 0x0000000000c30641 ZigClang_main
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xc30641)
#29 0x0000000000a305f6 main0(int, char**)
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0xa305f6)
#30 0x00000000009a31e7 main
(/home/andy/dev/bootstrap-zig/out/host/bin/zig+0x9a31e7)
#31 0x00007f10bfd1eb8e __libc_start_main
(/nix/store/y9zg6ryffgc5c9y67fcmfdkyyiivjzpj-glibc-2.27/lib/libc.so.6+0x22b8e)
#32 0x0000000000a2eefa _start
/build/glibc-2.27/csu/../sysdeps/x86_64/start.S:122:0
zig: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 10.0.0 (git at github.com:ziglang/bootstrap.git
fcb81df448efa3f414166feafc7bbab72c4654b0)
Target: riscv64-unknown-linux-musl
Thread model: posix
InstalledDir: /run/current-system/sw/bin

-- 
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/20200403/33047538/attachment-0001.html>


More information about the llvm-bugs mailing list