-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Open
Copy link
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]inline-asm
Description
Compiler Explorer:https://godbolt.org/z/fv5Eqn8xh
from clang 2.9: https://godbolt.org/z/qG5zbbGa1
Failure value returned from cantFail wrapped call
failed to parse constraints
UNREACHABLE executed at /root/llvm-project/llvm/include/llvm/Support/Error.h:765!
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: /opt/compiler-explorer/clang-assertions-trunk/bin/clang -gdwarf-4 -g -o /app/output.s -fno-verbose-asm -c --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics <source>
1. <eof> parser at end of file
2. <source>:2:8: LLVM IR generation of declaration 'f1'
3. <source>:2:8: Generating code for declaration 'f1'
#0 0x0000000003e4f898 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3e4f898)
#1 0x0000000003e4d554 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3e4d554)
#2 0x0000000003d99988 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x0000766304042520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x00007663040969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x0000766304042476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x00007663040287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x0000000003da52ea (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3da52ea)
#8 0x000000000374f3d1 llvm::InlineAsm::InlineAsm(llvm::FunctionType*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool, llvm::InlineAsm::AsmDialect, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x374f3d1)
#9 0x000000000374f767 llvm::ConstantUniqueMap<llvm::InlineAsm>::getOrCreate(llvm::PointerType*, llvm::InlineAsmKeyType) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x374f767)
#10 0x0000000003750529 llvm::InlineAsm::get(llvm::FunctionType*, llvm::StringRef, llvm::StringRef, bool, bool, llvm::InlineAsm::AsmDialect, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3750529)
#11 0x0000000004325834 clang::CodeGen::CodeGenFunction::EmitAsmStmt(clang::AsmStmt const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4325834)
#12 0x0000000004328624 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt const*, llvm::ArrayRef<clang::Attr const*>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4328624)
#13 0x00000000043304ac clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt const&, bool, clang::CodeGen::AggValueSlot) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x43304ac)
#14 0x0000000004395afc clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4395afc)
#15 0x00000000043a8bfe clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x43a8bfe)
#16 0x0000000004411a7a clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4411a7a)
#17 0x000000000440ccd4 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x440ccd4)
#18 0x000000000440d0eb clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x440d0eb)
#19 0x000000000441750b clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.0) CodeGenModule.cpp:0:0
#20 0x0000000004812ed6 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) ModuleBuilder.cpp:0:0
#21 0x00000000048028c4 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x48028c4)
#22 0x0000000006406cc4 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6406cc4)
#23 0x000000000480f748 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x480f748)
#24 0x0000000004ad90e5 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4ad90e5)
#25 0x0000000004a5c85e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4a5c85e)
#26 0x0000000004bc761e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4bc761e)
#27 0x0000000000d3b16f cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd3b16f)
#28 0x0000000000d32bea ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#29 0x0000000004857999 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#30 0x0000000003d99e34 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3d99e34)
#31 0x0000000004857f8f clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#32 0x000000000481a88d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x481a88d)
#33 0x000000000481b90e clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x481b90e)
#34 0x00000000048238a5 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x48238a5)
#35 0x0000000000d37f63 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd37f63)
#36 0x0000000000c09814 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xc09814)
#37 0x0000766304029d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#38 0x0000766304029e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#39 0x0000000000d32695 _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xd32695)
clang: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134code:
double f1() {
double x;
asm("" : "=r,r"(x) : "0b0,0"(x));
return x;
}Metadata
Metadata
Assignees
Labels
crashPrefer [crash-on-valid] or [crash-on-invalid]Prefer [crash-on-valid] or [crash-on-invalid]inline-asm