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

    <tr>
        <th>Summary</th>
        <td>
            Clang is failing compilation of linux kernel
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    I often encounter random crashes while compiling software. The following is an example of that. Sometimes re-launching compilation makes the process work. This time I have decided to report the issue as it was asked by the software. You can find below the stack trace along the error output. I also attached the files that the compiler asked to attach.

[bug_report.zip](https://github.com/llvm/llvm-project/files/11011252/bug_report.zip)

PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: /usr/bin/clang -Qunused-arguments -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -funsigned-char -std=gnu11 --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-avx2 -mno-avx512f -O3 -fcf-protection=none -m64 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mstack-alignment=8 -mskip-rax-setup -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mretpoline-external-thunk -mfunction-return=thunk-extern -mharden-sls=all -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -mtune=generic -O2 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-gnu -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fno-lto -flto=thin -fsplit-lto-unit -fvisibility=hidden -falign-functions=16 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wimplicit-fallthrough -fno-tree-vectorize -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-format -Wformat-extra-args -Wformat-invalid-specifier -Wformat-zero-length -Wnonnull -Wformat-insufficient-args -Wno-sign-compare -Wno-pointer-to-enum-cast -Wno-tautological-constant-out-of-range-compare -Wno-unaligned-access -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -DMODULE -DKBUILD_BASENAME=\"verbs\" -DKBUILD_MODNAME=\"irdma\" -D__KBUILD_MODNAME=kmod_irdma -c -Wp,-MMD,drivers/infiniband/hw/irdma/.verbs.o.d -fcolor-diagnostics -o drivers/infiniband/hw/irdma/verbs.o drivers/infiniband/hw/irdma/verbs.c
1. ./include/linux/netdevice.h:461:1: current parser token '{'
 #0 0x00007f327d97baaa (/usr/lib/libLLVM-15.so+0xd7baaa)
 #1 0x00007f327d97913f llvm::sys::RunSignalHandlers() (/usr/lib/libLLVM-15.so+0xd7913f)
 #2 0x00007f327d85c4a9 (/usr/lib/libLLVM-15.so+0xc5c4a9)
 #3 0x00007f327c651f50 (/usr/lib/libc.so.6+0x38f50)
 #4 0x00007f327d87c462 llvm::FoldingSetBase::GrowBucketCount(unsigned int, llvm::FoldingSetBase::FoldingSetInfo const&) (/usr/lib/libLLVM-15.so+0xc7c462)
 #5 0x00007f327d87c6f5 llvm::FoldingSetBase::InsertNode(llvm::FoldingSetBase::Node*, void*, llvm::FoldingSetBase::FoldingSetInfo const&) (/usr/lib/libLLVM-15.so+0xc7c6f5)
 #6 0x00007f3284f27433 clang::ASTContext::getFunctionTypeInternal(clang::QualType, llvm::ArrayRef<clang::QualType>, clang::FunctionProtoType::ExtProtoInfo const&, bool) const (/usr/lib/libclang-cpp.so.15+0x927433)
 #7 0x00007f3284f2715a clang::ASTContext::getFunctionTypeInternal(clang::QualType, llvm::ArrayRef<clang::QualType>, clang::FunctionProtoType::ExtProtoInfo const&, bool) const (/usr/lib/libclang-cpp.so.15+0x92715a)
 #8 0x00007f3285b54699 (/usr/lib/libclang-cpp.so.15+0x1554699)
 #9 0x00007f3285b581b0 clang::Sema::GetTypeForDeclarator(clang::Declarator&, clang::Scope*) (/usr/lib/libclang-cpp.so.15+0x15581b0)
#10 0x00007f328568471e clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>) (/usr/lib/libclang-cpp.so.15+0x108471e)
#11 0x00007f3285698d8d clang::Sema::ActOnStartOfFunctionDef(clang::Scope*, clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>, clang::Sema::SkipBodyInfo*, clang::Sema::FnBodyKind) (/usr/lib/libclang-cpp.so.15+0x1098d8d)
#12 0x00007f3284ef8644 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/usr/lib/libclang-cpp.so.15+0x8f8644)
#13 0x00007f3284e76613 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/usr/lib/libclang-cpp.so.15+0x876613)
#14 0x00007f3284ee71c2 (/usr/lib/libclang-cpp.so.15+0x8e71c2)
#15 0x00007f3284efcf5c clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/usr/lib/libclang-cpp.so.15+0x8fcf5c)
#16 0x00007f3284efd340 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/usr/lib/libclang-cpp.so.15+0x8fd340)
#17 0x00007f3284e49009 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/libclang-cpp.so.15+0x849009)
#18 0x00007f32864ee109 clang::FrontendAction::Execute() (/usr/lib/libclang-cpp.so.15+0x1eee109)
#19 0x00007f3286493b8f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/libclang-cpp.so.15+0x1e93b8f)
#20 0x00007f3286558cca clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/libclang-cpp.so.15+0x1f58cca)
#21 0x000055b70a01a4d0 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+0x104d0)
#22 0x000055b70a020177 (/usr/bin/clang+0x16177)
#23 0x00007f32861dc319 (/usr/lib/libclang-cpp.so.15+0x1bdc319)
#24 0x00007f327d85c577 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/libLLVM-15.so+0xc5c577)
#25 0x00007f32861e1e0f (/usr/lib/libclang-cpp.so.15+0x1be1e0f)
#26 0x00007f32861a556e clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/libclang-cpp.so.15+0x1ba556e)
#27 0x00007f32861a592d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/libclang-cpp.so.15+0x1ba592d)
#28 0x00007f32861fea1c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/lib/libclang-cpp.so.15+0x1bfea1c)
#29 0x000055b70a0227d9 clang_main(int, char**) (/usr/bin/clang+0x187d9)
#30 0x00007f327c63c790 (/usr/lib/libc.so.6+0x23790)
#31 0x00007f327c63c84a __libc_start_main (/usr/lib/libc.so.6+0x2384a)
#32 0x000055b70a016d25 _start (/usr/bin/clang+0xcd25)
clang-15: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 15.0.7
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-15: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-15: note: diagnostic msg: /tmp/verbs-8ef013.c
clang-15: note: diagnostic msg: /tmp/verbs-8ef013.sh
clang-15: note: diagnostic
 msg:

********************
make[5]: *** [scripts/Makefile.build:252: drivers/infiniband/hw/irdma/verbs.o] Error 1
make[5]: *** Attesa per i processi non terminati....
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWlt346iy_jXqFxZeuliy_JAHJ45nsifpZHcyO-s8ZWEoWRwj0AGUS__6s0CyLZxLJzPn8rB7dacVKKq--iiqAIkYwzcS4CTKT6N8-Y10tlb65Dto9QMqAc_f1oq9nFwgVVmQCCRVnbSgkSaSqQZRTUwNBj3VXACiqmm54HKDjKrsE9EwQXc1oEoJoZ5cOzeISATPpGkFIFUhWxM7QbeqAcsbMEgDFqSTtHbSvT5iuZKoIVswyNaAWq0oGIOelN46_dwgNxZdoJo8AmJAOQOGrEIaWqWtH8SN6QARg7hFT8QgYrbA0PrFdx7Q_ofqECUSVVwytAahnnoBS-gWWU0oICKU3PhW0FpppDrbdnaCLhARRiFiLaG1s-8c58KDJj2I3h_Qg3W7k55E8TKKF8PP_HTdbR567JOfvI3yZZSWtbWtibJFlK6idLXhtu7WE6qaKF0J8bj7D7da_SdQG6UrbztKV0kSJ0map1G6OtKbzsd2by7PF7fnyHTrhltE0Lrb7AlU6MvmPeHOPiKSIS6p6Bj0LLiYQWtCt57QKD1DrYZhVoEhozrdN7uRxBhFObHAkO4kMlTz1g6E3fppYV3TOmS-KZ4g_-dGq40mDSJ60zUgrcOOonTVGe2I4DJKV1QQuUH4n53sDDC8F0W4agjVCrcaKv6MG9JG2XLiXM-WCN8TIRC-7ySDCuF7HwVRtjRWc2odA1bZlxYMwvdSYav5RpO2dlqlwoMUEZwYF-K-kaqmURLhytRKW_xEa6L7npu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