<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - internal error with symbol defined from C and asm"
   href="https://bugs.llvm.org/show_bug.cgi?id=45900">45900</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>internal error with symbol defined from C and asm
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>arnd@linaro.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This trivial (invalid) source causes an internal error with the integrated
assembler (see also <a href="https://godbolt.org/z/9JoX9S">https://godbolt.org/z/9JoX9S</a>):

    int sym; asm("sym:");


fatal error: error in backend: symbol 'sym' is already defined

PLEASE submit a bug report to <a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> 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>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
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>
<span class="quote">>, std::__cxx11::basic_string<char, std::char_traits<char>,</span >
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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>