<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62669>62669</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm-project/llvm/lib/Support/StringMap.cpp:185 assert
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          morozov1001
      </td>
    </tr>
</table>

<pre>
    Assert when compiling git version 

CentOS Linux release 7.9.2009 (Core)

% gcc --version
gcc (GCC) 13.1.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

cmake version 3.18.0

cmake -S llvm -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ \
-DCMAKE_INSTALL_PREFIX=/home/morozov/20230509-llvm -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PROJECTS="clang;flang;lldb;openmp" \
-DLLVM_OPTIMIZED_TABLEGEN=ON .

[ 33%] Optimizing LLVM bitcode libomptarget-nvptx-sm_50.bc
opt: /home/morozov/llvm-project/llvm/lib/Support/StringMap.cpp:185: void llvm::StringMapImpl::RemoveKey(llvm::StringMapEntryBase*): Assertion `V == V2 && "Didn't find key?"' failed.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: ../../../../bin/opt -O3 -openmp-opt-disable -attributor-enable=module /home/morozov/llvm-project/build/projects/openmp/libomptarget/DeviceRTL/internalized_libomptarget-nvptx-sm_50.bc -o /home/morozov/llvm-project/build/projects/openmp/libomptarget/DeviceRTL/libomptarget-nvptx-sm_50.bc
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  opt 0x000056329cf82564 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 74
1  opt             0x000056329cf8291b
2  opt 0x000056329cf80002 llvm::sys::RunSignalHandlers() + 146
3  opt 0x000056329cf81ec9
4  libpthread.so.0 0x00007f7272c1a630
5  libc.so.6 0x00007f727169e387 gsignal + 55
6  libc.so.6       0x00007f727169fa78 abort + 328
7  libc.so.6       0x00007f72716971a6
8  libc.so.6 0x00007f7271697252
9  opt             0x000056329cef775a llvm::StringMapImpl::RemoveKey(llvm::StringMapEntryBase*) + 162
10 opt 0x000056329c7c1611
11 opt             0x000056329c7c0fa5 llvm::ValueSymbolTable::removeValueName(llvm::StringMapEntry<llvm::Value*>*) + 35
12 opt             0x000056329c5283d0 llvm::SymbolTableListTraits<llvm::Instruction>::removeNodeFromList(llvm::Instruction*) + 108
13 opt             0x000056329c52a33d
14 opt 0x000056329c529cb1
15 opt             0x000056329c6a35cb llvm::Instruction::eraseFromParent() + 63
16 opt 0x000056329dc837d0
17 opt             0x000056329dc8472b llvm::IPSCCPPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 385
18 opt             0x000056329d2a6b17
19 opt 0x000056329c76cd6d llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) + 289
20 opt 0x000056329b041759 llvm::runPassPipeline(llvm::StringRef, llvm::Module&, llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef, llvm::ArrayRef<llvm::PassPlugin>, llvm::opt_tool::OutputKind, llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool, bool) + 6051
21 opt             0x000056329b07124e main + 6383
22 libc.so.6 0x00007f727168a555 __libc_start_main + 245
23 opt 0x000056329b03eb29
/bin/sh: line 1: 20738 Aborted                 (core dumped) ../../../../bin/opt -O3 -openmp-opt-disable -attributor-enable=module /home/morozov/llvm-project/build/projects/openmp/libomptarget/DeviceRTL/internalized_libomptarget-nvptx-sm_50.bc -o /home/morozov/llvm-project/build/projects/openmp/libomptarget/DeviceRTL/libomptarget-nvptx-sm_50.bc
make[2]: *** [projects/openmp/libomptarget/DeviceRTL/libomptarget-nvptx-sm_50.bc] Error 134
make[1]: *** [projects/openmp/libomptarget/DeviceRTL/CMakeFiles/omptarget-nvptx-sm_50-bc.dir/all] Error 2

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWEuT2roS_jWaTReULeHXYhbm4YQbGCggqeRsKNkWoDu25JJkJuTX35LtmZjMhJzKzdkdagoYqR9fd3_dlqBa86Ng7B55Y-RN72htTlLdl1LJb_LsOo57l8r8ch9rzZSBpxMTkMmy4gUXRzhyA2emNJcCkDNFTty-T5gwqy0suKi_gmIFo5pBMIyG2HEiQDicSMUQjvo6CHtwzDIYDDqL7bJdQjh8N5kgHIFLhu7Q6ZzI6qL48WQag3YXO5hAohiDrTyYJ6oYJLIWOTXWHJ7AXGTDVnl34hq4hoOV1p00ImPQjIE52bVaZQwOUkEmq4uNNpMi59aUHgLsTkwxa-Fh1Vp8okpRYS7WiJAG2JmJRn0520zexw-7eDxfzHdfQCpI5ruH2XYLyWoDMazjzW4--biIN7D-uFmvtrNhPzFZSR_ZS5rJ0A2fM9DfH2yhKM4lDMaQ1rzIYfAOEMYfBf8KS_rIDrxgGmEMg-lkGX-Y7ccf54vpfvdlPUNkOmVpfXzZmuwnq-V6vphtEJk2NXne-Pz5agvhMcJjQN6khfIsN3_Y7uLFYr_ezJL5Z0SmCCcnWTKEk45ZCCe2Wo7nRIMW93Sx-LTc7-LNu9luu9-tWoCITD-H_vPu7CEeL2b79Wb1n9lkt20M46yg4ojI-NB9FkWeIjKWFRNlZSPuwWusrNa7-XL-12y631lz72YPiExXD3CVdeSNgRCEPeRNYVUZXvJvlgTWAqTcZDJnUPBUlpWh6sjMQJwr83Wgy73nDNOstSIrg0gM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