<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/111304>111304</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] [Trunk] Type not integer, floating, or complex UNREACHABLE executed at /root/llvm-project/clang/lib/Sema/SemaChecking.cpp:8093!
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
yijan4845
</td>
</tr>
</table>
<pre>
Compiler Explorer: [https://godbolt.org/z/Ms8PxroKc](https://godbolt.org/z/Ms8PxroKc)
Attempting to compile the following simple program with Clang Assertion Trunk:
```c
_Atomic(int) a;
int abs();
void b() { abs(a); }
```
Stack dump:
```
Type not integer, floating, or complex
UNREACHABLE executed at /root/llvm-project/clang/lib/Sema/SemaChecking.cpp:8093!
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 -O3 <source>
1. <source>:3:17: current parser token ')'
2. <source>:3:10: parsing function body 'b'
3. <source>:3:10: in compound statement ('{}')
#0 0x0000000003b99d28 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3b99d28)
#1 0x0000000003b979ec llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3b979ec)
#2 0x0000000003ae61f8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x000071ede2442520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x000071ede24969fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#5 0x000071ede2442476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#6 0x000071ede24287f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#7 0x0000000003af1aca (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3af1aca)
#8 0x000000000683962c (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x683962c)
#9 0x000000000687a7da clang::Sema::CheckAbsoluteValueFunction(clang::CallExpr const*, clang::FunctionDecl const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x687a7da)
#10 0x0000000006880573 clang::Sema::CheckFunctionCall(clang::FunctionDecl*, clang::CallExpr*, clang::FunctionProtoType const*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6880573)
#11 0x0000000006c2ba89 clang::Sema::BuildResolvedCallExpr(clang::Expr*, clang::NamedDecl*, clang::SourceLocation, llvm::ArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool, clang::CallExpr::ADLCallKind) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6c2ba89)
#12 0x0000000006c2c98b clang::Sema::BuildCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6c2c98b)
#13 0x0000000006c2fa8c clang::Sema::ActOnCallExpr(clang::Scope*, clang::Expr*, clang::SourceLocation, llvm::MutableArrayRef<clang::Expr*>, clang::SourceLocation, clang::Expr*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6c2fa8c)
#14 0x000000000669d3fd clang::Parser::ParsePostfixExpressionSuffix(clang::ActionResult<clang::Expr*, true>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x669d3fd)
#15 0x0000000006695dc1 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, bool&, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6695dc1)
#16 0x0000000006697f17 clang::Parser::ParseCastExpression(clang::Parser::CastParseKind, bool, clang::Parser::TypeCastState, bool, bool*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6697f17)
#17 0x0000000006697fa9 clang::Parser::ParseAssignmentExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6697fa9)
#18 0x000000000669c9c9 clang::Parser::ParseExpression(clang::Parser::TypeCastState) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x669c9c9)
#19 0x000000000671f4a9 clang::Parser::ParseExprStatement(clang::Parser::ParsedStmtContext) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x671f4a9)
#20 0x000000000671587c clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x671587c)
#21 0x0000000006716790 clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6716790)
#22 0x0000000006717665 clang::Parser::ParseCompoundStatementBody(bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6717665)
#23 0x0000000006718dba clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6718dba)
#24 0x000000000662bec3 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x662bec3)
#25 0x00000000066612cd clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x66612cd)
#26 0x000000000661fc0e clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x661fc0e)
#27 0x00000000066203ce clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x66203ce)
#28 0x0000000006627b63 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6627b63)
#29 0x0000000006628a4d clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x6628a4d)
#30 0x000000000661af6a clang::ParseAST(clang::Sema&, bool, bool) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x661af6a)
#31 0x00000000044f0998 clang::CodeGenAction::ExecuteAction() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x44f0998)
#32 0x00000000047aa2e9 clang::FrontendAction::Execute() (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x47aa2e9)
#33 0x0000000004728c2e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4728c2e)
#34 0x000000000488fb6e clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x488fb6e)
#35 0x0000000000cd801f cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xcd801f)
#36 0x0000000000ccfd2a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#37 0x0000000004534669 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
#38 0x0000000003ae66a4 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x3ae66a4)
#39 0x0000000004534c5f 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
#40 0x00000000044fa59d clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x44fa59d)
#41 0x00000000044fb68d 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+0x44fb68d)
#42 0x0000000004502fb5 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0x4502fb5)
#43 0x0000000000cd4eef clang_main(int, char**, llvm::ToolContext const&) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xcd4eef)
#44 0x0000000000ba49a4 main (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xba49a4)
#45 0x000071ede2429d90 (/lib/x86_64-linux-gnu/libc.so.6+0x29d90)
#46 0x000071ede2429e40 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x29e40)
#47 0x0000000000ccf7de _start (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+0xccf7de)
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/eJzkWl9z66a3_TTKC2OPhGT9eciDYsftadOeTJzbVw9CyKGRQRdQjnM__R1ASoT85-S0Sm_v_DptY0uw91qLzWaDQVLSHSPk2lvceIvVFWrVExfXr_RPxKI0WlwVvHy9XvJ9Q2siwO2hqbkgwgtz4C1unpRqpBfmHlx7cL3jZcFrNedi58H1_3hw_ZtM7w-C_4q9xcqD6cebw8zzV56f2__nSpF9oyjbAcUBtmCAeiKg4nXNv-kXku6bmoBG8J1Ae_CNqiewrBHbgVxKIhTlDDyKlj1r_9Z27Nt_sf2-zRXfU-zBlDLlwQwgL7yxryhTABXSg6lG1j994bQEhX0IvOSma4JsG-Alq5GjIaeNQvgZlO2-OQZkvz6-NgQwrgBliuyI8OASVDVHWgf9mQsjRU0Otv1__f5wmy9_zm_ubgE5ENwqUgKkgAfXgnPlwXVdv-xnjeB_Eqy_Yi2PfkwLD643ZI-6P8sngp8p281xo9GlfhZ6MLBe7u9u880tkG2xpwogULQ7IEjDhdJjMxphqp7aYo75vnN-jIFK2RLpwTVArASU4bot7dBigeQTKBB-VgJhohk3gjSCYyIlKYHkrbCPdU8kJccUacqiZUBiQRs1Pyu1P_f87L6LFSR27Z4wJU1UwzVvjDpdzM9IH_OdYjPUB5ScKRNRcF1Q1r8Gs135DYlqFoHZDsy4toiaRtttVdOquQSzvVYBzGaHNJ4huZ_JV6bQwQtXeqhrMKsYn70QUXBJ9Hsw24DZbIfxTHFe4ydEmReuLiLVjSVDjXziCswqzGsuZiVFO8alolhaH0Zj9_HXEHjhshM3vLVyBVou53GYh16YB4mWDLdCEKZAg4QkAij-TBjwYKLnAUysBXjOgq8t6J56Elctw2am6qyjTRRvBsKLBigzc4G3rARSIUX0eAIzNRMvudFT0eIxtoAHQx_4B7__JyyyrIQpMDEa5l6Yy1dpP9wLypSJoEcbhul7I4G-bblUgqC9B2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