<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/119617>119617</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] FE crash on `std::greater<void>{}(ext_vector_type, ext_vector_type)`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
aelovikov-intel
</td>
</tr>
</table>
<pre>
https://godbolt.org/z/P6daoG6jW
```
#include <functional>
using vector_t = int __attribute__((ext_vector_type(16)));
auto foo(vector_t a, vector_t b) {
return std::greater<void>{}(a, b);
}
```
Fails with
```
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 -std=c++17 <source>
1. <source>:4:35: current parser token ')'
2. <source>:3:34: parsing function body 'foo'
3. <source>:3:34: in compound statement ('{}')
4. /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/stl_function.h:524:2: instantiating function definition 'std::greater<>::operator()<int & __attribute__((ext_vector_type(16))), int & __attribute__((ext_vector_type(16)))>'
5. /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.0/../../../../include/c++/15.0.0/type_traits:203:12: instantiating class definition 'std::__and_<std::greater<>::__not_overloaded<int & __attribute__((ext_vector_type(16))), int & __attribute__((ext_vector_type(16)))>, std::is_convertible<int & __attribute__((ext_vector_type(16))), const volatile void *>, std::is_convertible<int & __attribute__((ext_vector_type(16))), const volatile void *>>'
6. /opt/compiler-explorer/gcc-snapshot/lib/gcc/x86_64-linux-gnu/15.0.0/../../../../include/c++/15.0.0/bits/stl_function.h:566:9: instantiating class definition 'std::greater<>::__not_overloaded<int & __attribute__((ext_vector_type(16))), int & __attribute__((ext_vector_type(16)))>'
#0 0x0000000003c17778 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3c17778)
#1 0x0000000003c15484 llvm::sys::CleanupOnSignal(unsigned long) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x3c15484)
#2 0x0000000003b629e8 CrashRecoverySignalHandler(int) CrashRecoveryContext.cpp:0:0
#3 0x000071bb73242520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#4 0x0000000006bbd08c LookupMemberExpr(clang::Sema&, clang::LookupResult&, clang::ActionResult<clang::Expr*, true>&, bool&, clang::SourceLocation, clang::CXXScopeSpec&, clang::Decl*, bool, clang::SourceLocation) SemaExprMember.cpp:0:0
#5 0x0000000006bc071b clang::Sema::BuildMemberReferenceExpr(clang::Expr*, clang::QualType, clang::SourceLocation, bool, clang::CXXScopeSpec&, clang::SourceLocation, clang::NamedDecl*, clang::DeclarationNameInfo const&, clang::TemplateArgumentListInfo const*, clang::Scope const*, clang::Sema::ActOnMemberAccessExtraArgs*) (/opt/compiler-explorer/clang-assertions-trunk/bin/clang+++0x6bc071b)
#6 0x000000000706f44b clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformCXXDependentScopeMemberExpr(clang::CXXDependentScopeMemberExpr*) SemaTemplateInstantiate.cpp:0:0
#7 0x0000000007046bf9 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) SemaTemplateInstantiate.cpp:0:0
#8 0x00000000070597be clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformCallExpr(clang::CallExpr*) SemaTemplateInstantiate.cpp:0:0
#9 0x0000000007046cee clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformExpr(clang::Expr*) SemaTemplateInstantiate.cpp:0:0
#10 0x000000000703e097 clang::TreeTransform<(anonymous namespace)::TemplateInstantiator>::TransformType(clang::TypeLocBuilder&, clang::TypeLoc) SemaTemplateInstantiate.cpp:0:0
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMWN1u47oRfhr6hpAhUbJ-Lnyh2HF7gLRnuwnQvRMoaizzhCIFkvI6ffqClJz136abng3OBlIikJzhN9_McCakxvBWAizR4g4t1jM62J3SSwpC7fmz2gdcWhCzWjUvy521vUFxicgGkU2rmloJO1e6RWTzH0Q2n9KGqr-lf_wbhaV70nB6whKRmEsmhgYwilfbQTLLlaQCxfcoLAfDZYv3wKzSlcUoXmMuLa4qaq3m9WChqhDJEcnhYKvjupceEMmjFJFieuI7FJZ0sApvlUIkf9VIEVl9018jUmCUucVYgx20xMY2zrC4bDVQCxrFq73ijYOX3aFsjUjuddSv27jBCxvDckO5MPgrt7uLuU8P9-XjPTZD3XGLKa6HFmvolbbYKnxBLLe7oZ4z1SGyEWJ__BP0Wv0BzCKy4cYMYBDZYCobfGTW7gAzTc0O15Q9W00ZOMy9hl4rBsZAg40a9DjsJKkxinFqocF6kNgwzXs7R2H5aCl7xs3Q9Q5WWIZzFBaftGo17TDV7dCBtA4yRmSjeoeJqa7nAnQAh14oDdqNCSrbgBoD2vnbBFYP8hmRTc3lcRqRO0TucNA2X6neBgkOWhwop5f2vdM-2H6wc4ODzrGAg-CQpwE1XWBepKUHFK99jOJgK1WwB10rA24eB484CFrGAquUYDvKJYrXb-J1i42kvdkpi4MtU0LpoOG0lcpYzsy4h-f4fNjHz5qNtkSZC_KJaR_gkaPvbCwuExSX8cJRyAatQVrcU21AY6ueQWJEMh_VGQpLckM8dq_T4cVc_hyzCrtkdfI-CZx8_KY8l9hxoQbZYGOpBedb7PMtO0a_xxKWiVf0owy6uOX1OIjI5pCnVZoEgsvhELRyQGQTLebhPERkM59f_5rC2m008noqUHPr4t9YUR3tnu9QXC6Is4mMdhlLpeXUnrHTwJZL7j8RyW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