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: unassignedclangb...@nondot.org
          Reporter: jdoerf...@anl.gov
                CC: andrey.churba...@intel.com,
                    jonathan.l.pey...@intel.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to