Skip to content

[CUDA] device side asserts crash clang when using -g #101819

@OgnianM

Description

@OgnianM
$ clang++ -g -x cuda -c test.cu
ptxas /tmp/test-sm_52-55e123.s, line 841; fatal   : Parsing error near '.': syntax error
ptxas fatal   : Ptx assembly aborted due to errors
clang++: error: ptxas command failed with exit code 255 (use -v to see invocation)
clang version 20.0.0git (https://github.com/llvm/llvm-project.git 5bd38a98d7585841c1688f6b9eee8ce150dc429c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang++: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/test-731cd8.cu
clang++: note: diagnostic msg: /tmp/test-sm_52-df7b05.cu
clang++: note: diagnostic msg: /tmp/test-731cd8.sh
clang++: note: diagnostic msg: 

********************

test.cu:

#include <cassert>

__global__ void test(int x) { assert(x > 10); }


int main() {
	test<<<1,1>>>(5);
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions