https://bugs.llvm.org/show_bug.cgi?id=49579

            Bug ID: 49579
           Summary: critical in lambda can't access context value,
                    assertion/crash
           Product: OpenMP
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Clang Compiler Support
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

The following code triggers `llvm_unreachable("No context value for inlined
OpenMP region");` in `CGOpenMPInlinedRegionInfo::getContextValue`:

```
template <typename T> void b(T c) { c(); }
double q() {
  double d;
  b([&]() {
#pragma omp critical
    d;
  });
}
```

https://godbolt.org/z/YrxW8c

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to