[llvm-bugs] [Bug 27295] New: Giving struct with member as argument to __global__ function produces illegal memory access
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 8 12:26:33 PDT 2016
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: unassignedclangbugs at nondot.org
Reporter: crtrott at sandia.gov
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160408/0a86ca2c/attachment.html>
More information about the llvm-bugs
mailing list