Issue |
132429
|
Summary |
Clang crash when using stdc++ features in OpenMP offloaded regions
|
Labels |
clang
|
Assignees |
|
Reporter |
KaruroChori
|
To be clear, this code is not expected to compile, but the appropriate error message would be for the linker to complain of missing symbols, as it rightfully does when stripping a bit the content of `gen_cpp`.
```
fatal error: error in backend: Copy one register into another with a different width
clang++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 21.0.0git (https://github.com/llvm/llvm-project 1b455df780ed1d578b63f969c636fe78b2eb6014)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /archive/shared/apps/cross-clang/install3/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/main-sm_86-e545ff.cpp
clang++: note: diagnostic msg: /tmp/main-016287.cpp
clang++: note: diagnostic msg: /tmp/main-sm_86-e545ff.sh
clang++: note: diagnostic msg:
```
The code responsible is
```
#pragma omp target
{
SDF_Sphere.gen_cpp(std::cout);
}
```
Which internally expects to operate on an ostream.
The error message is not stable, in the sense that small variations in code, location and context led to a different one yesterday. I no longer have records of that, but it was something about the compiler being unable to relax a type, or something of that sort.
[2025-03-20-bug-report.zip](https://github.com/user-attachments/files/19394305/2025-03-20-bug-report.zip)
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs