Issue |
136652
|
Summary |
[OpenMP] Compiler segfault with `#pragma omp` in global lambda
|
Labels |
new issue
|
Assignees |
|
Reporter |
KaruroChori
|
https://godbolt.org/z/vnMM79oYf
This segfaults:
```cpp
#include <omp.h>
auto slice_work = [](size_t device, float start, float end){
#pragma omp target teams device(device)
{
}
};
int main(){
slice_work(0,0,0);
return 0;
}
```
Moving the lambda to a local function, even as static will compile just fine:
```cpp
#include <omp.h>
int main(){
static auto slice_work = [](size_t device, float start, float end) {
#pragma omp target teams device(device)
{
}
};
slice_work(0,0,0);
return 0;
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs