intel / intel/llvm

Compiler error when using `sycl::vec<const T, N>{}`

Open
#12,501 0 comments 0 reactions 1 assignee Claimed by @dkhaldi View on GitHub
bug confirmed
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

**Describe the bug**
Compiler error when constructing constant vector types using a default class.

**To Reproduce**
compile with: `clang++ -fsycl test.cpp`

**test.cpp**
```
#include

int main() {
sycl::queue Q;

sycl::vec my_vec{};

return 0;
}
```

**Error**
```
/opt/slurm/dpcpp-nightly/2024-01-25/include/sycl/types.hpp:895:8: error: multiple overloads of 'load' instantiate to the same signature 'void (size_t, multi_ptr)' (aka 'void (unsigned long, multi_ptr)')
895 | void load(size_t Offset, multi_ptr Ptr) {
| ^
test.cpp:6:30: note: in instantiation of template class 'sycl::vec' requested here
6 | sycl::vec my_vec{};
| ^
/opt/slurm/dpcpp-nightly/2024-01-25/include/sycl/types.hpp:888:8: note: previous declaration is here
888 | void load(size_t Offset, multi_ptr Ptr) {
| ^
1 error generated.
```

**Environment (please complete the following information):**

- OS: Linux
- Target device and vendor: All device targets + host
- DPC++ version: Nightly release 2024-01-25

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.