https://llvm.org/bugs/show_bug.cgi?id=30775
Bug ID: 30775 Summary: Assertion `NodeToMatch->getOpcode() != ISD::DELETED_NODE && "NodeToMatch was removed partway through selection"' failed. Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: vsevolod.livins...@frtk.ru CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 17480 --> https://llvm.org/bugs/attachment.cgi?id=17480&action=edit Reproducer. Assertion `NodeToMatch->getOpcode() != ISD::DELETED_NODE && "NodeToMatch was removed partway through selection"' failed. =============================================================================== Reproducer: int a, f; short b, c, d, e; struct i { int g : 25; unsigned h : 16; int : 1; } l; struct m { i j; } k; void n() { e = (k.j.h + c + b >= unsigned(a && l.g) * 0) - (k.j.h + c + k.j.h + b + (a && l.g) * l.g && l.g); d = f >> k.j.h + (k.j.h + c + k.j.h + b >= 0); } =============================================================================== LLVM version: clang version 4.0.0 (trunk 284990) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/vlivinsk/workspace/llvm/bin-trunk//bin Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6 Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0 Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0 Candidate multilib: .;@m64 Selected multilib: .;@m64 =============================================================================== Error: >$ clang++ -O3 -c small.cpp clang-4.0: /home/vlivinsk/workspace/llvm/llvm-trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:3458: void llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, const unsigned char*, unsigned int): Assertion `NodeToMatch->getOpcode() != ISD::DELETED_NODE && "NodeToMatch was removed partway through selection"' failed. #0 0x00000000014298b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x14298b8) #1 0x000000000142750e llvm::sys::RunSignalHandlers() (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x142750e) #2 0x0000000001427682 SignalHandler(int) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1427682) #3 0x00007fac2fd943d0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113d0) #4 0x00007fac2ef4a418 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x35418) #5 0x00007fac2ef4c01a abort (/lib/x86_64-linux-gnu/libc.so.6+0x3701a) #6 0x00007fac2ef42bd7 (/lib/x86_64-linux-gnu/libc.so.6+0x2dbd7) #7 0x00007fac2ef42c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82) #8 0x0000000001b1b180 llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b1b180) #9 0x00000000009e515f (anonymous namespace)::X86DAGToDAGISel::Select(llvm::SDNode*) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9e515f) #10 0x0000000001b0ff45 llvm::SelectionDAGISel::DoInstructionSelection() (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b0ff45) #11 0x0000000001b13d7f llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b13d7f) #12 0x0000000001b1e2dc llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b1e2dc) #13 0x0000000001b204f9 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) [clone .part.722] [clone .constprop.746] (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b204f9) #14 0x00000000009e9d04 (anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9e9d04) #15 0x0000000000d37955 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0xd37955) #16 0x000000000103f803 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x103f803) #17 0x000000000103f8cc llvm::FPPassManager::runOnModule(llvm::Module&) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x103f8cc) #18 0x000000000103f36d llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x103f36d) #19 0x00000000015b34e8 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> >) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x15b34e8) #20 0x0000000001be2623 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1be2623) #21 0x0000000001fc4f38 clang::ParseAST(clang::Sema&, bool, bool) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1fc4f38) #22 0x0000000001bdda69 clang::CodeGenAction::ExecuteAction() (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1bdda69) #23 0x00000000018eee16 clang::FrontendAction::Execute() (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x18eee16) #24 0x00000000018c1146 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x18c1146) #25 0x00000000019748a2 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x19748a2) #26 0x000000000091d048 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x91d048) #27 0x00000000008dfa54 main (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x8dfa54) #28 0x00007fac2ef35830 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x20830) #29 0x0000000000919a19 _start (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x919a19) Stack dump: 0. Program arguments: /home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0 -cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.cpp -mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb -coverage-notes-file /home/vlivinsk/workspace/yarpgen/found/clang/S_4051824292/small.gcno -resource-dir /home/vlivinsk/workspace/llvm/bin-trunk/bin/../lib/clang/4.0.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0 -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/backward -internal-isystem /usr/local/include -internal-isystem /home/vlivinsk/workspace/llvm/bin-trunk/bin/../lib/clang/4.0.0/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -fdeprecated-macro -fdebug-compilation-dir /home/vlivinsk/workspace/yarpgen/found/clang/S_4051824292 -ferror-limit 19 -fmessage-length 172 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o small.o -x c++ small.cpp 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module 'small.cpp'. 4. Running pass 'X86 DAG->DAG Instruction Selection' on function '@_Z1nv' 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 (trunk 284990) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /home/vlivinsk/workspace/llvm/bin-trunk//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/small-f6a70a.cpp clang-4.0: note: diagnostic msg: /tmp/small-f6a70a.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