Issue 173777
Summary [clang][CUDA] Assertion `Actions.size() > 1' failed.
Labels cuda, clang:tooling, crash-on-valid
Assignees
Reporter zeyi2
    There are a lot of cases that will trigger this assertion failure:

(`empty.cu` is a empty file)

- `-E`:
`../build/bin/clang-check empty.cu -- --offload-arch=sm_70 -E`
- multi-arch device-only
`../build/bin/clang-check empty.cu -- --cuda-device-only --offload-arch=sm_70 --offload-arch=sm_80`
- `-M`:
`../build/bin/clang-check empty.cu -- --offload-arch=sm_70 -M`
- `-fsyntax-only`:
`../build/bin/clang-check empty.cu -- --offload-arch=sm_70 -fsyntax-only`

Logs are basically the same:
```
clang-check: /home/mitchell/Documents/projects/llvm-project/clang/lib/Tooling/Tooling.cpp:111: bool ignoreExtraCC1Commands(const clang::driver::Compilation*): Assertion `Actions.size() > 1' failed.
 #0 0x0000560570e21709 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/mitchell/Documents/projects/llvm-project/build/bin/clang-check+0x2ff4709)
 #1 0x0000560570e1e984 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #2 0x00007f220383e4d0 (/usr/lib/libc.so.6+0x3e4d0)
 #3 0x00007f220389890c (/usr/lib/libc.so.6+0x9890c)
 #4 0x00007f220383e3a0 raise (/usr/lib/libc.so.6+0x3e3a0)
 #5 0x00007f220382557a abort (/usr/lib/libc.so.6+0x2557a)
 #6 0x00007f22038254e3 __assert_perror_fail (/usr/lib/libc.so.6+0x254e3)
 #7 0x000056056e640c78 clang::tooling::getCC1Arguments(clang::DiagnosticsEngine*, clang::driver::Compilation*) (.cold) Tooling.cpp:0:0
 #8 0x00005605711721fc clang::tooling::ToolInvocation::run() (/home/mitchell/Documents/projects/llvm-project/build/bin/clang-check+0x33451fc)
 #9 0x0000560571173d5a clang::tooling::ClangTool::run(clang::tooling::ToolAction*) (/home/mitchell/Documents/projects/llvm-project/build/bin/clang-check+0x3346d5a)
#10 0x000056056ea9f904 main (/home/mitchell/Documents/projects/llvm-project/build/bin/clang-check+0xc72904)
#11 0x00007f2203827635 (/usr/lib/libc.so.6+0x27635)
#12 0x00007f22038276e9 __libc_start_main (/usr/lib/libc.so.6+0x276e9)
#13 0x000056056ec11635 _start (/home/mitchell/Documents/projects/llvm-project/build/bin/clang-check+0xde4635)
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to