Issue 127106
Summary [CUDA] Compiler crash when `cudaLaunchKernel` is declared otherwise
Labels new issue
Assignees
Reporter AdUhTkJm
    For this [test case](https://godbolt.org/z/v3GGf9aqb):
```
int cudaLaunchKernel();

__global__ void fn() {}

int main() {
    fn<<<1, 1>>>();
}
```

Clang would crash when compiled with `--cuda-host-only`. The reason is that `emitDeviceStubBodyNew` retrieves the type `dim3` by looking into the second argument of `cudaLaunchKernel`, which does not exist in this case.

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to