<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/99275>99275</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[Clang] PR https://github.com/llvm/llvm-project/pull/80801 cause CUDA 9.2 thrust library compile error
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
yihanwg
</td>
</tr>
</table>
<pre>
https://github.com/llvm/llvm-project/pull/80801 cause CUDA 9.2 thrust library compile error.
```
cuda-9.2/include/thrust/system/cuda/detail/cub/block/../iterator/../thread/thread_store.cuh:351:56: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
351 | IterateThreadStore<0, VOLATILE_MULTIPLE>::template Dereference(
| ^
```
```
/**
* ThreadStore definition for STORE_VOLATILE modifier on non-primitive pointer types
*/
template <typename T>
__device__ __forceinline__ void ThreadStoreVolatilePtr(
T *ptr,
T val,
Int2Type<false> /*is_primitive*/)
{
// Create a temporary using shuffle-words, then store using volatile-words
typedef typename UnitWord<T>::VolatileWord VolatileWord;
typedef typename UnitWord<T>::ShuffleWord ShuffleWord;
const int VOLATILE_MULTIPLE = sizeof(T) / sizeof(VolatileWord);
const int SHUFFLE_MULTIPLE = sizeof(T) / sizeof(ShuffleWord);
VolatileWord words[VOLATILE_MULTIPLE];
#pragma unroll
for (int i = 0; i < SHUFFLE_MULTIPLE; ++i)
reinterpret_cast<ShuffleWord*>(words)[i] = reinterpret_cast<ShuffleWord*>(&val)[i];
IterateThreadStore<0, VOLATILE_MULTIPLE>::template Dereference(
reinterpret_cast<volatile VolatileWord*>(ptr),
words);
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8Vl2P4jYU_TWXlytQYhMgDzzwFXWkqXa1w-w-IpPcgLvGjmyHXfrrKxsIMDNVu1LVKJrx9cfxOcf3xgjn5E4TTSG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