[llvm-bugs] [Bug 45900] New: internal error with symbol defined from C and asm
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 13 06:19:32 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45900
Bug ID: 45900
Summary: internal error with symbol defined from C and asm
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: arnd at linaro.org
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
This trivial (invalid) source causes an internal error with the integrated
assembler (see also https://godbolt.org/z/9JoX9S):
int sym; asm("sym:");
fatal error: error in backend: symbol 'sym' is already defined
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /opt/compiler-explorer/clang-trunk/bin/clang -g -o
./output.s -S --gcc-toolchain=/opt/compiler-explorer/gcc-9.2.0
-fcolor-diagnostics -fno-crash-diagnostics <source>
1. <eof> parser at end of file
2. Code generation
#0 0x0000562ae993414a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2bce14a)
#1 0x0000562ae9931f14 llvm::sys::RunSignalHandlers()
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2bcbf14)
#2 0x0000562ae9932185 llvm::sys::CleanupOnSignal(unsigned long)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2bcc185)
#3 0x0000562ae98aa972 llvm::CrashRecoveryContext::HandleExit(int)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2b44972)
#4 0x0000562ae992b0d7 llvm::sys::Process::Exit(int)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2bc50d7)
#5 0x0000562ae7b919d1 LLVMErrorHandler(void*, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+0xe2b9d1)
#6 0x0000562ae98b0ef1 llvm::report_fatal_error(llvm::Twine const&, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2b4aef1)
#7 0x0000562aea39e703
llvm::AsmPrinter::emitGlobalVariable(llvm::GlobalVariable const*)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x3638703)
#8 0x0000562aea399d9a llvm::AsmPrinter::doFinalization(llvm::Module&)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x3633d9a)
#9 0x0000562ae9283e0c llvm::FPPassManager::doFinalization(llvm::Module&)
(.localalias.512) (/opt/compiler-explorer/clang-trunk/bin/clang+0x251de0c)
#10 0x0000562ae9290270 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x252a270)
#11 0x0000562ae9ba9828 (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2e43828)
#12 0x0000562ae9bab3ea 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> >)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2e453ea)
#13 0x0000562aea6d1abc
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x396babc)
#14 0x0000562aeb3cf269 clang::ParseAST(clang::Sema&, bool, bool)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x4669269)
#15 0x0000562aea107839 clang::FrontendAction::Execute()
(/opt/compiler-explorer/clang-trunk/bin/clang+0x33a1839)
#16 0x0000562aea0c2b03
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x335cb03)
#17 0x0000562aea1cbd4b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x3465d4b)
#18 0x0000562ae7b92e8c cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/opt/compiler-explorer/clang-trunk/bin/clang+0xe2ce8c)
#19 0x0000562ae7b8fabd ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/opt/compiler-explorer/clang-trunk/bin/clang+0xe29abd)
#20 0x0000562ae9f9d455 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)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x3237455)
#21 0x0000562ae98aa803
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x2b44803)
#22 0x0000562ae9f9e0c0
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.152)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x32380c0)
#23 0x0000562ae9f788c5
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/opt/compiler-explorer/clang-trunk/bin/clang+0x32128c5)
#24 0x0000562ae9f7930f
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/opt/compiler-explorer/clang-trunk/bin/clang+0x321330f)
#25 0x0000562ae9f81e15
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/opt/compiler-explorer/clang-trunk/bin/clang+0x321be15)
#26 0x0000562ae7ad4020 main
(/opt/compiler-explorer/clang-trunk/bin/clang+0xd6e020)
#27 0x00007fa0cd1aeb97 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b97)
#28 0x0000562ae7b8f63a _start
(/opt/compiler-explorer/clang-trunk/bin/clang+0xe2963a)
clang-11: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
Compiler returned: 70
--
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/20200513/33ff5902/attachment-0001.html>
More information about the llvm-bugs
mailing list