[llvm-bugs] [Bug 45047] New: Captured variables stored twice into task

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Feb 27 09:05:26 PST 2020


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

            Bug ID: 45047
           Summary: Captured variables stored twice into task
           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: andrey.churbanov at intel.com,
                    jonathan.l.peyton at intel.com, llvm-bugs at lists.llvm.org

In the following simple example we store A twice into the task structure
(https://godbolt.org/z/Wq9xx6). The second time is especially problematic since
we use the hardcoded 40 byte offset from the `task_alloc` return instead of
loading the `shared` pointer value (first in the task struct).

void foo(int *A) {
    #pragma omp task
    {
        *A = 0;
    }
}

-- 
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/20200227/53551855/attachment.html>


More information about the llvm-bugs mailing list