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

    <tr>
        <th>Summary</th>
        <td>
            [clang] unexpected Neon vector element type
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:codegen,
            crash-on-valid,
            regression:19,
            clang:frontend:fuzzer
      </td>
    </tr>

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

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

<pre>
    **This testcase is generated by a fuzzer.**

Compiler Explorer: [https://godbolt.org/z/PorPzbKE3](https://godbolt.org/z/PorPzbKE3)

This code will crash on Clang Trunk and Clang Assertion Trunk.
```cpp
typedef unsigned __INT64_TYPE__ uint64_t;
typedef __attribute__((neon_vector_type(1))) uint64_t uint64x1_t;
void f(uint64x1_t v) { }
```

It seems that this goes back to clang-19.

Stack dump:
```
unexpected Neon vector element type
UNREACHABLE executed at /root/llvm-project/clang/lib/AST/ItaniumMangle.cpp:3852!
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: /opt/compiler-explorer/clang-assertions-trunk/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -fno-verbose-asm -S --gcc-toolchain=/opt/compiler-explorer/gcc-snapshot -fcolor-diagnostics -fno-crash-diagnostics <source>
1.      <eof> parser at end of file
2.      <source>:3:6: LLVM IR generation of declaration 'f'
3.      <source>:3:6: Generating code for declaration 'f'
4.      <source>:3:6: Mangling declaration 'f'
 #0 0x0000000003be87b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3be87b8)
 #1 0x0000000003be64bc llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3be64bc)
 #2 0x0000000003b33df8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
 #3 0x00007308dfa42520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x00007308dfa969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x00007308dfa42476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x00007308dfa287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x0000000003b3f71a (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3b3f71a)
 #8 0x0000000007e11141 (anonymous namespace)::CXXNameMangler::mangleType(clang::VectorType const*) ItaniumMangle.cpp:0:0
 #9 0x0000000007e0a1ca (anonymous namespace)::CXXNameMangler::mangleType(clang::QualType) ItaniumMangle.cpp:0:0
#10 0x0000000007e172ae (anonymous namespace)::CXXNameMangler::mangleBareFunctionType(clang::FunctionProtoType const*, bool, clang::FunctionDecl const*) ItaniumMangle.cpp:0:0
#11 0x0000000007e187a0 (anonymous namespace)::CXXNameMangler::mangleFunctionEncoding(clang::GlobalDecl) ItaniumMangle.cpp:0:0
#12 0x0000000007e19887 (anonymous namespace)::CXXNameMangler::mangle(clang::GlobalDecl) ItaniumMangle.cpp:0:0
#13 0x0000000007e1c0b4 (anonymous namespace)::ItaniumMangleContextImpl::mangleCXXName(clang::GlobalDecl, llvm::raw_ostream&) ItaniumMangle.cpp:0:0
#14 0x0000000007e4081b clang::MangleContext::mangleName(clang::GlobalDecl, llvm::raw_ostream&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x7e4081b)
#15 0x0000000003fee21c getMangledNameImpl(clang::CodeGen::CodeGenModule&, clang::GlobalDecl, clang::NamedDecl const*, bool) CodeGenModule.cpp:0:0
#16 0x0000000003ff4a5d clang::CodeGen::CodeGenModule::getMangledName(clang::GlobalDecl) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3ff4a5d)
#17 0x00000000040362d1 clang::CodeGen::CodeGenModule::GetAddrOfFunction(clang::GlobalDecl, llvm::Type*, bool, bool, clang::CodeGen::ForDefinition_t) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x40362d1)
#18 0x0000000004036679 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4036679)
#19 0x00000000040316e5 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x40316e5)
#20 0x0000000004031acb clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4031acb)
#21 0x000000000403beb3 clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.0) CodeGenModule.cpp:0:0
#22 0x0000000004563246 (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) ModuleBuilder.cpp:0:0
#23 0x0000000004553f78 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4553f78)
#24 0x00000000066e22f4 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x66e22f4)
#25 0x0000000004560df8 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4560df8)
#26 0x000000000481b949 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x481b949)
#27 0x000000000479abbe clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x479abbe)
#28 0x00000000049016de clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x49016de)
#29 0x0000000000ce5b8f cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xce5b8f)
#30 0x0000000000cdd84a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#31 0x00000000045a3f79 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#32 0x0000000003b342a4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3b342a4)
#33 0x00000000045a456f clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.0) Job.cpp:0:0
#34 0x000000000456a8dd clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x456a8dd)
#35 0x000000000456b9cd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x456b9cd)
#36 0x0000000004572d85 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x4572d85)
#37 0x0000000000ce2a29 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xce2a29)
#38 0x0000000000bafbc4 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xbafbc4)
#39 0x00007308dfa29d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#40 0x00007308dfa29e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#41 0x0000000000cdd2fe _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0xcdd2fe)
clang++: error: clang frontend command failed with exit code 134 (use -v to see invocation)
Compiler returned: 134
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkWl1v27jS_jXMDSFDomR9XOTCceJu9-128zY5iz1XAkWNbG0lUiAp1-mvPyAl16LqpEk3WRzgFGkb82PmeR4OhyNaVKl6ywEu0fIKLa8vaK93Ql4-1H9RHqXR8qIQ5cMlIitEVve7WmENSjOqANcKb4GDpBpKXDxgiqv-61eQi2Ew8q-RP_67Fm1XNyDxzaFrhASJwhVGy6ud1p1C4QqRDSKbrSgL0eiFkFtENl8R2dwKefu1-L-bEC2vEUmfP5xkU_cWNxMl4C9102AmqdphwfG6oXyL72XPP2PKy_HzSimQuhZ86FmMlmJ_-GFdN7Tohw5KqHDPrYIlzvP3H-_jKL__9-1NnuO-5jqOco3CK3dCnlOtZV30GvIckRSRlIPg-R6YFjI3wxBJA0PC_nyzNP5yCCZG96IucYVIeurDezMJJVcYJdcz9FNZ3musAFqF9Y5qrI1IWwEKF5R9xlpgZuTwgmwxnXSnTW_Zt51ZiHPGew6HDpiJio8gOB5oYWigBa6xpWcH_uvjp5vV-pfV1YcbDAdgvZlCNUZkI4XQiGyaZt96nRR_ATMfLSDTXBeIbFZ394hs3mvK6779jfJtAwuzOOEqTJcEkWDwcvvhZnV3g1VftLXGFBf9FkvohNSG4yykar3riwUT7ej8ewy1Uj0oRDY2YmrOmr4ErHcwhpURT0vKAJE17iR0UjBQCkqsRC-HZjOTKiVYbfeO7DlWTNadXjyqsb9AfnYrxVbSFlO57Y2Wym4jshGdVWfcZB4cN9momEePEa08bUIakU1R85OgV4hcYW9bfqGy8iLsbbEnjF3adcZ6r7teLxT2WqMF9rxDGntUtZ564JoeUHhdcw0N9iouvD3IQigw_di7w563ZczTQjRsR2uOwusn8ZrBitNO7YTGXsVEI6RX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