[llvm-bugs] [Bug 48121] New: Clang does not diagnose access to the host-side variables from device-side code.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 9 11:35:13 PST 2020


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

            Bug ID: 48121
           Summary: Clang does not diagnose access to the host-side
                    variables from device-side code.
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: All
            Status: CONFIRMED
          Severity: enhancement
          Priority: P
         Component: CUDA
          Assignee: tra at google.com
          Reporter: tra at google.com
                CC: llvm-bugs at lists.llvm.org

Following code compiles to PTX. It should not. Clang should produce an error
when device-side code attempts to access host-side data.
https://godbolt.org/z/faPWcv


int host_var;

__global__ void kernel(int * out)
{
    *out = host_var;
}

-- 
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/20201109/1883c0aa/attachment.html>


More information about the llvm-bugs mailing list