https://llvm.org/bugs/show_bug.cgi?id=30470
Bug ID: 30470 Summary: ARM backend crash: Unknown addressing mode for CP reference Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Backend: ARM Assignee: unassignedb...@nondot.org Reporter: oliver.stann...@arm.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 17322 --> https://llvm.org/bugs/attachment.cgi?id=17322&action=edit C reproducer The attached C file causes a crash in the ARM constant islands pass when compiled for a v6-m target with -O0 and -fast-isel=false. $ clang --target=arm--none-eabi -c pp.c -O0 -march=armv6-m -mllvm -fast-isel=false Unknown addressing mode for CP reference! UNREACHABLE executed at /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:741! #0 0x00000000034f07c6 llvm::sys::PrintStackTrace(llvm::raw_ostream&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/Support/Unix/Signals.inc:402:0 #1 0x00000000034f0b88 PrintStackTraceSignalHandler(void*) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/Support/Unix/Signals.inc:466:0 #2 0x00000000034eeeb8 llvm::sys::RunSignalHandlers() /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/Support/Signals.cpp:44:0 #3 0x00000000034f0137 SignalHandler(int) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/Support/Unix/Signals.inc:256:0 #4 0x00007fd3f1f9a340 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10340) #5 0x00007fd3f0b87cc9 gsignal /build/buildd/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0 #6 0x00007fd3f0b8b0d8 abort /build/buildd/eglibc-2.19/stdlib/abort.c:91:0 #7 0x0000000003489f13 bindingsErrorHandler(void*, std::string const&, bool) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/Support/ErrorHandling.cpp:127:0 #8 0x0000000001fcc746 (anonymous namespace)::ARMConstantIslands::initializeFunctionInfo(std::vector<llvm::MachineInstr*, std::allocator<llvm::MachineInstr*> > const&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:750:0 #9 0x0000000001fcac61 (anonymous namespace)::ARMConstantIslands::runOnMachineFunction(llvm::MachineFunction&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:365:0 #10 0x0000000002c375f7 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/CodeGen/MachineFunctionPass.cpp:62:0 #11 0x0000000002fc16ac llvm::FPPassManager::runOnFunction(llvm::Function&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/IR/LegacyPassManager.cpp:1522:0 #12 0x0000000002fc183f llvm::FPPassManager::runOnModule(llvm::Module&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/IR/LegacyPassManager.cpp:1543:0 #13 0x0000000002fc1bcb (anonymous namespace)::MPPassManager::runOnModule(llvm::Module&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/IR/LegacyPassManager.cpp:1599:0 #14 0x0000000002fc22c1 llvm::legacy::PassManagerImpl::run(llvm::Module&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/IR/LegacyPassManager.cpp:1702:0 #15 0x0000000002fc2501 llvm::legacy::PassManager::run(llvm::Module&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/lib/IR/LegacyPassManager.cpp:1734:0 #16 0x000000000375810c (anonymous namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:713:0 #17 0x0000000003758b50 clang::EmitBackendOutput(clang::DiagnosticsEngine&, 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> >) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:798:0 #18 0x00000000040e78f2 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:196:0 #19 0x0000000004c91166 clang::ParseAST(clang::Sema&, bool, bool) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/lib/Parse/ParseAST.cpp:161:0 #20 0x0000000003ca726e clang::ASTFrontendAction::ExecuteAction() /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:559:0 #21 0x00000000040e691b clang::CodeGenAction::ExecuteAction() /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:876:0 #22 0x0000000003ca6d15 clang::FrontendAction::Execute() /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:462:0 #23 0x0000000003c55a38 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:872:0 #24 0x0000000003dc65df clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:249:0 #25 0x0000000001b791f2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/tools/driver/cc1_main.cpp:183:0 #26 0x0000000001b6f438 ExecuteCC1Tool(llvm::ArrayRef<char const*>, llvm::StringRef) /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/tools/driver/driver.cpp:299:0 #27 0x0000000001b6febf main /tmp/plgbuild/abs_build/552484_21284/trunk/work/src/llvm/tools/clang/tools/driver/driver.cpp:380:0 #28 0x00007fd3f0b72ec5 __libc_start_main /build/buildd/eglibc-2.19/csu/libc-start.c:321:0 #29 0x0000000001b6cda9 _start (/arm/warehouse/OpenSource/llvm/0.0/1255/linux-x86_64-high-dbg/bin/clang-4.0+0x1b6cda9) Stack dump: 0. Program arguments: /arm/warehouse/OpenSource/llvm/0.0/1255/linux-x86_64-high-dbg/bin/clang-4.0 -cc1 -triple thumbv6m--none-eabi -emit-obj -mrelax-all -disable-free -main-file-name pp.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu cortex-m0 -target-feature +soft-float-abi -target-feature +strict-align -target-abi aapcs -mfloat-abi soft -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /work/csmith/temp/pp.gcno -resource-dir /arm/warehouse/OpenSource/llvm/0.0/1255/linux-x86_64-high-dbg/bin/../lib/clang/4.0.0 -O0 -fdebug-compilation-dir /work/csmith/temp -ferror-limit 19 -fmessage-length 148 -fallow-half-arguments-and-returns -fno-signed-char -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -mllvm -fast-isel=false -o pp.o -x c pp.c 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'pp.c'. 4. Running pass 'ARM constant island placement and branch shortening pass' on function '@fn1' clang-4.0: error: unable to execute command: Aborted (core dumped) clang-4.0: error: clang frontend command failed due to signal (use -v to see invocation) clang version 4.0.0 Target: arm--none-eabi Thread model: posix InstalledDir: /arm/warehouse/OpenSource/llvm/0.0/1255/linux-x86_64-high-dbg/bin clang-4.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-4.0: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-4.0: note: diagnostic msg: /tmp/pp-3c2c6f.c clang-4.0: note: diagnostic msg: /tmp/pp-3c2c6f.sh clang-4.0: note: diagnostic msg: ******************** -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs