NVIDIA / NVIDIA/cccl

[BUG]: `cuda::std::__tuple` or empty classes with `[[no_unique_address]]` attribute segfaults on CTK 12.9

Open
#7,111 1 comment 0 reactions 1 assignee Claimed by @ericniebler View on GitHub
Dominant language
C++
Stars
2.5k
Forks
486
Avg merge
2d 6h
Merged PRs (30d)
295

Description

### Is this a duplicate?

- [x] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cccl/issues) for this bug and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)

### Type of Bug

Silent Failure

### Component

libcu++

### Describe the bug

`cuda::std::tuple` or empty classes with `[[no_unique_address]]` attribute segfaults on CTK 12.9 with both GCC and Clang host compiler's with both C++ 17 and 20 dialects.

### How to Reproduce

https://godbolt.org/z/GKrE43xsK

```#include

struct max_segment_size_42
{};

__host__ __device__ void test_tuple_empty()
{
[[maybe_unused]] ::cuda::std::__tuple t{};
}

int main(int, char**)
{
test_tuple_empty();
return 0;
}
```

### Expected behavior

Should compile sucessfully

### Reproduction link

_No response_

### Operating System

_No response_

### nvidia-smi output

_No response_

### NVCC version

_No response_

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.