NVIDIA / NVIDIA/cccl

[BUG]: Add test case for nvbug 4678853

Open
#2,045 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.5k
Forks
487
Avg merge
2d 7h
Merged PRs (30d)
296

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

Compile-time Error

### Component

CUB

### Describe the bug

Multiple definition error from 4678853 needs a reproducer added to our test suite. This should be as simple as linking together a pair of each header. We should probably try to do this in every project if not already done.

### How to Reproduce

```
create bar.cc
#include

create foo.cc
#include
```

```
build:
g++ -c -fPIC -I /usr/local/cuda/include bar.cc
g++ -c -fPIC -I /usr/local/cuda/include foo.cc
g++ -fPIC bar.o foo.o -shared -Wl,-soname,libhello.so -o libhello.so
```

### Expected behavior

We shouldn't emit multiple definition errors by leaking non-static interfaces into the TU.

### Reproduction link

_No response_

### Operating System

_No response_

### nvidia-smi output

_No response_

### NVCC version

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with bar.cc and foo.cc, each including thrust/complex.h, using the g++ commands in the report. Locate the CUB test suite and add a regression case that links both translation units successfully without multiple-definition errors; check whether equivalent coverage exists for the other projects.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.