<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/112205>112205</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang++] Assertion `Name.isIdentifier() && "Name is not a simple identifier"' failed.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:codegen,
crash-on-invalid,
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/fYaqP9Gx1](https://godbolt.org/z/fYaqP9Gx1)
This invalid code will crash on Clang Assertion Trunk, it seems that this goes back to clang-17:
```cpp
void *operator new(unsigned long) __attribute__((alias("A")));
```
Stack dump:
```
clang++: /root/llvm-project/clang/include/clang/AST/Decl.h:275: llvm::StringRef clang::NamedDecl::getName() const: Assertion `Name.isIdentifier() && "Name is not a simple identifier"' failed.
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-17.0.1/bin/clang++ -gdwarf-4 -g -o /app/output.s -mllvm --x86-asm-syntax=intel -fno-verbose-asm -S --gcc-toolchain=/opt/compiler-explorer/gcc-13.2.0 -fcolor-diagnostics -fno-crash-diagnostics <source>
1. <eof> parser at end of file
2. Per-file LLVM IR generation
#0 0x00000000036e7558 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x36e7558)
#1 0x00000000036e53dc llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x36e53dc)
#2 0x0000000003632918 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x000074b16d242520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x000074b16d2969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x000074b16d242476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x000074b16d2287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x000074b16d22871b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
#8 0x000074b16d239e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#9 0x0000000003aad7e8 clang::CodeGen::CodeGenModule::checkAliases() (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x3aad7e8)
#10 0x0000000003ae06f4 clang::CodeGen::CodeGenModule::Release() (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x3ae06f4)
#11 0x000000000493ba1a (anonymous namespace)::CodeGeneratorImpl::HandleTranslationUnit(clang::ASTContext&) ModuleBuilder.cpp:0:0
#12 0x000000000493a54d clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x493a54d)
#13 0x0000000005deb979 clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x5deb979)
#14 0x0000000004939258 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x4939258)
#15 0x00000000041a1c09 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x41a1c09)
#16 0x00000000041278ce clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x41278ce)
#17 0x0000000004281de6 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x4281de6)
#18 0x0000000000bc67eb cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0xbc67eb)
#19 0x0000000000bbefaa ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#20 0x0000000003f83419 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
#21 0x0000000003632dc4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x3632dc4)
#22 0x0000000003f83a0f 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
#23 0x0000000003f4b275 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x3f4b275)
#24 0x0000000003f4bcdd clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x3f4bcdd)
#25 0x0000000003f5385d clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0x3f5385d)
#26 0x0000000000bc4a87 clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0xbc4a87)
#27 0x0000000000abef61 main (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0xabef61)
#28 0x000074b16d229d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#29 0x000074b16d229e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#30 0x0000000000bbea8e _start (/opt/compiler-explorer/clang-assertions-17.0.1/bin/clang+++0xbbea8e)
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/eJzkWU1z2zjS_jXwBUUVCX4ffJBla95MZd5Nxd6p2pMKBJsUJiTABUBHzq_fAkhZhCxnx1P2XDalJBLY6H766UajQVCteSsArlF6g9LbKzqavVTXT_wPKpIiSa8qWT9dI7JGZP2w5xob0IZRDZhr3IIARQ3UuHrCFDfjjx-gVpMwCm9ROP-7kf3AO1D47jB0UoFC8Rqj9GZvzKBRvEZki8i2lXUlO7OSqkVk-wORbfMv-u8v5S-HCKW3iBR_XpyUS_MONxePtOM1ZrIG_J13HWaK6j2WAm86Klq81hqU4VLgBzWKb4hsMDdYA_Qamz012Fg1rQSNK8q-YSMxsxODKLeYJntZOH3YMEwjj5LXGJG1HCxTUmEB3xEpRuFor3EnRYtIiXc7aozi1Whgt0OkQKSgHafafbWEEuvU9Ilvzqwtnb03Flw99sNLVNNPhxqRG_uxcSBbJaVBZNt1j30wKPkHMPtzlttywbqxhsXI-v4Bke0tsG61R_Ga5KlVZKdbm_H63igu2q_QTAxNg_9Pe6jtnOlnC8aOOP9KzKTQxio5RQFloRVYcf2pBmF4w0HN0ohkiGQYEWIlbCYKaTDFmvdDB5gv5AkiOW4o76BeTe5_-Xy3vr_Deqx6bidVY4sVDFIZG9KzHONmP1YrJvuZnpcsca1H0IhsMRU1nrnCZg9zftlcMYoysAk1KBiUZKA11FjLUU3DdibVWjLuFpMaBdZM8cGsXo1puEJh-UXJVtEeU9WOPQij53jKwcVvXnUBHFfdHMGAHknWQZSvwlWEyLbi4hRhmxs4aOvvVDVBgoMWB9IqpsNg1Y9mGM1K46C3ZOAgOBRZQHUf6Cdh6AHFt1wY6HDQCBk8gqqkBvscB_c4CFrGAiNlx_aUCxTf_hSwFY7iFVmFOGiY7KQKak5bIbXhTE8WHNHeMIo3M7vx3cRXZPlC8QZkg-I7PFClQWFqMIgaywY3v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