-
Notifications
You must be signed in to change notification settings - Fork 294
Closed
Labels
bugSomething isn't working right.Something isn't working right.
Description
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
Type of Bug
Compile-time Error
Component
libcu++
Describe the bug
A handful of barrier tests fail to build with clang due to their attempts to use bit_cast<barrier> which fails to compile because barrier is not trivially copyable.
https://godbolt.org/z/M6qjz1hsh
E.g:
cccl/libcudacxx/test/libcudacxx/cuda/barrier/cp_async_bulk.pass.cpp
Lines 44 to 48 in 813e75e
| #if _CCCL_CUDA_COMPILER(CLANG) | |
| __shared__ char barrier_data[sizeof(barrier)]; | |
| barrier& bar = cuda::std::bit_cast<barrier>(barrier_data); | |
| #else // ^^^ _CCCL_CUDA_COMPILER(CLANG) ^^^ / vvv !_CCCL_CUDA_COMPILER(CLANG) | |
| __shared__ barrier bar; |
<source>:16:18: error: no matching function for call to 'bit_cast'
16 | barrier& bar = cuda::std::bit_cast<barrier>(barrier_data);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/compiler-explorer/libs/cccl/trunk/libcudacxx/include/cuda/std/__bit/bit_cast.h:52:61: note: candidate template ignored: requirement 'is_trivially_copyable_v<cuda::barrier<cuda::std::thread_scope_block, cuda::std::__empty_completion>> || __is_extended_floating_point_v<cuda::barrier<cuda::std::thread_scope_block, cuda::std::__empty_completion>>' was not satisfied [with _To = barrier, _From = char[8], $2 = 0]
52 | [[nodiscard]] _CCCL_API inline _CCCL_CONSTEXPR_BIT_CAST _To bit_cast(const _From& __from) noexcept
How to Reproduce
https://godbolt.org/z/M6qjz1hsh
Expected behavior
Test should be compileable.
Reproduction link
https://godbolt.org/z/M6qjz1hsh
Operating System
No response
nvidia-smi output
No response
NVCC version
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't working right.Something isn't working right.
Type
Projects
Status
Done