[llvm-bugs] [Bug 49579] New: critical in lambda can't access context value, assertion/crash

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 13 11:16:32 PST 2021


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: unassignedclangbugs at nondot.org
          Reporter: jdoerfert at anl.gov
                CC: a.bataev at hotmail.com, llvm-bugs at lists.llvm.org

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210313/9cad5a21/attachment.html>


More information about the llvm-bugs mailing list