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

    <tr>
        <th>Summary</th>
        <td>
            LLVM build fails with GCC 12 on GNU/Linux
        </td>
    </tr>

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

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

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

<pre>
    Using GCC 12.1.0 to build LLVM+Clang+LLD on GNU/Linux. Build fails with the following error with GCC 12, when it was fine with GCC 11:
```
[2478/3646] Building CXX object tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o
FAILED: tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o 
/usr/bin/c++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/sources/llvm/LLVM-build/tools/clang/lib/ASTMatchers/Dynamic -I/sources/llvm/tools/clang/lib/ASTMatchers/Dynamic -I/sources/llvm/tools/clang/include -I/sources/llvm/LLVM-build/tools/clang/include -I/sources/llvm/LLVM-build/include -I/sources/llvm/include -flarge-source-files -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -Os -DNDEBUG  -fno-exceptions -std=c++14 -MD -MT tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o -MF tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o.d -o tools/clang/lib/ASTMatchers/Dynamic/CMakeFiles/obj.clangDynamicASTMatchers.dir/Registry.cpp.o -c /sources/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp
{standard input}: Assembler messages:
{standard input}:132812: Error: unbalanced parenthesis in operand 2.
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
ninja: build stopped: subcommand failed.
```
Tested with LLVM 14.0.3. I haven't been able to test with a development git checkout, since LLVM takes too long to build to able to test it in other cases, so if it has been fixed upstream already, I apologise. I'll also be happy to provide any additional information if it is needed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy9Vttu4zYQ_Rr5haAgyZckD35w7DgwaidF4jTbp4CSKIm7FKmSlBPv1--hpMZpul1g2yKAbEoczsyZKyfV-XH-YIUqyfVySeIkjMOIOE3SVsicbLe_7YLkcimZKrFutyuiFbm-eQiS9Vao9iUkl93BgglpybNwFXEVJ4WWUj97qdwYbXpCryBIluS54ooIR56ZJYVQ_A09DsaLIFoF0SKYRcPTf04vk8nZORSPZ5NZMF31mr2O5adPRKefeeaAXEuLM1mPeC1Fiv_F_X7HXFZx42mro2K1yPC23LEvfC0k99uQEHZsA_0NU5gLgxN3vBTWmWOYNU2oe1jrxWZ7tQLoj1RNBpck69Z6aiqUV4wI4SF09YQIPd3fPtwtr_zX0_1-tXxa3t7c7xc3-6fdYnl3e38irG_vdou_b283u81pdwMFVrcm6wBLeah9CiA9aJcp-PgJ-_9B3P8vQahMtjn_N_B_gvXHR1-phWSm5LQ_QAsfe2z-ulniX2lqec2UExkVynHTaCucQLHR4iCsSIUU7giSRLlYWok8RwnRx668gvEqZ45TJ2qoeWRSesqLMwwrJLeqtTynDTOs5pCN3WcjwICMQv0A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