https://llvm.org/bugs/show_bug.cgi?id=27295
Bug ID: 27295 Summary: Giving struct with member as argument to __global__ function produces illegal memory access Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: CUDA Assignee: unassignedclangb...@nondot.org Reporter: crtr...@sandia.gov CC: llvm-bugs@lists.llvm.org Classification: Unclassified Created attachment 16191 --> https://llvm.org/bugs/attachment.cgi?id=16191&action=edit Reproducer I am giving a struct with a pointer to int as member as an argument to a global function. When using the pointer (which was set through a cudaMalloc call) I get an illegal memory access error. The code works fine with NVCC. The basic pattern is: struct Bar { int* ptr; }; __global__ void foo(Bar b) { b.ptr[0] = 1; } A reproducer is attached. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs