<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 - AF: `(isUnknownLocation() || isRegisterLocation()) && "location description already locked down"' failed"
   href="https://bugs.llvm.org/show_bug.cgi?id=48277">48277</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>AF: `(isUnknownLocation() || isRegisterLocation()) && "location description already locked down"' failed
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>douglas_yung@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=24199" name="attach_24199" title="repro.cpp">attachment 24199</a> <a href="attachment.cgi?id=24199&action=edit" title="repro.cpp">[details]</a></span>
repro.cpp

We saw a new compiler crash in several of our internal test suites today which
I bisected down to commit 6ef7835afca246e623e9990dcd8c71204f5691e5.

Compiling the attached source code on x86_64 linux with a compiler built from
the above commit with optimizations and debug info (-O2 -g) results in an
assertion failure in the compiler being hit:

clang:
/home/dyung/src/upstream/llvm_clean_git/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp:45:
void llvm::DwarfExpression::addReg(int, const char *): Assertion
`(isUnknownLocation() || isRegisterLocation()) && "location description already
locked down"' failed.
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:
/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang
-c -g -O2 repro.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'repro.cpp'.
4.      Running pass 'X86 Assembly Printer' on function '@_Z3fn1v'
 #0 0x0000000005471573 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5471573)
 #1 0x000000000546f37e llvm::sys::RunSignalHandlers()
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x546f37e)
 #2 0x000000000547091d llvm::sys::CleanupOnSignal(unsigned long)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x547091d)
 #3 0x00000000053ecc83 (anonymous
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x53ecc83)
 #4 0x00000000053ecdee CrashRecoverySignalHandler(int)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x53ecdee)
 #5 0x00007f459b2613c0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x153c0)
 #6 0x00007f459ad1218b raise
/build/glibc-YYA7BZ/glibc-2.31/signal/../sysdeps/unix/sysv/linux/raise.c:51:1
 #7 0x00007f459acf1859 abort /build/glibc-YYA7BZ/glibc-2.31/stdlib/abort.c:81:7
 #8 0x00007f459acf1729 get_sysdep_segment_value
/build/glibc-YYA7BZ/glibc-2.31/intl/loadmsgcat.c:509:8
 #9 0x00007f459acf1729 _nl_load_domain
/build/glibc-YYA7BZ/glibc-2.31/intl/loadmsgcat.c:970:34
#10 0x00007f459ad02f36 (/lib/x86_64-linux-gnu/libc.so.6+0x36f36)
#11 0x0000000006152c20
llvm::DwarfExpression::addMachineRegExpression(llvm::TargetRegisterInfo const&,
llvm::DIExpressionCursor&, llvm::Register, unsigned int)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x6152c20)
#12 0x0000000006124c05 llvm::DwarfDebug::emitDebugLocValue(llvm::AsmPrinter
const&, llvm::DIBasicType const*, llvm::DbgValueLoc const&,
llvm::DwarfExpression&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x6124c05)
#13 0x0000000006122141 llvm::DebugLocEntry::finalize(llvm::AsmPrinter const&,
llvm::DebugLocStream::ListBuilder&, llvm::DIBasicType const*,
llvm::DwarfCompileUnit&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x6122141)
#14 0x00000000061214ba
llvm::DwarfDebug::collectEntityInfo(llvm::DwarfCompileUnit&, llvm::DISubprogram
const*, llvm::DenseSet<std::pair<llvm::DINode const*, llvm::DILocation const*>,
llvm::DenseMapInfo<std::pair<llvm::DINode const*, llvm::DILocation const*> >
<span class="quote">>&)</span >
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x61214ba)
#15 0x0000000006122f5c llvm::DwarfDebug::endFunctionImpl(llvm::MachineFunction
const*)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x6122f5c)
#16 0x0000000006109bce
llvm::DebugHandlerBase::endFunction(llvm::MachineFunction const*)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x6109bce)
#17 0x00000000060f5f7c llvm::AsmPrinter::emitFunctionBody()
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x60f5f7c)
#18 0x00000000041e7e06
llvm::X86AsmPrinter::runOnMachineFunction(llvm::MachineFunction&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x41e7e06)
#19 0x00000000048b1a7e
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x48b1a7e)
#20 0x0000000004cd2b68 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x4cd2b68)
#21 0x0000000004cd9618 llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x4cd9618)
#22 0x0000000004cd3217 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x4cd3217)
#23 0x00000000056b5701 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> >)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x56b5701)
#24 0x0000000005e6cfd6
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5e6cfd6)
#25 0x0000000006f2dc63 clang::ParseAST(clang::Sema&, bool, bool)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x6f2dc63)
#26 0x0000000005db54e3 clang::FrontendAction::Execute()
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5db54e3)
#27 0x0000000005d0c6b2
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5d0c6b2)
#28 0x0000000005e67032
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5e67032)
#29 0x000000000344e3e1 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x344e3e1)
#30 0x000000000344c10c ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x344c10c)
#31 0x0000000005ba5512 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::$_1>(long)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5ba5512)
#32 0x00000000053ecba1
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x53ecba1)
#33 0x0000000005ba4b29
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
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5ba4b29)
#34 0x0000000005b6c684
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5b6c684)
#35 0x0000000005b6cbca
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5b6cbca)
#36 0x0000000005b86508
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x5b86508)
#37 0x000000000344b8c4 main
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x344b8c4)
#38 0x00007f459acf30b3 __libc_start_main
/build/glibc-YYA7BZ/glibc-2.31/csu/../csu/libc-start.c:342:3
#39 0x0000000003448d9e _start
(/home/dyung/src/upstream/6ef7835afca246e623e9990dcd8c71204f5691e5-linux/bin/clang+0x3448d9e)
clang-12: error: clang frontend command failed with exit code 134 (use -v to
see invocation)
clang version 12.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
6ef7835afca246e623e9990dcd8c71204f5691e5)
Target: x86_64-unknown-linux-gnu
Thread model: posix</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>