[cfe-commits] [PATCH] Fixing bug for function calls w/ diff addr spaces
Anton Lokhmotov
Anton.Lokhmotov at arm.com
Fri Jun 15 07:33:59 PDT 2012
Hi Tanya,
The code itself looks good to me. But I'm worried why Clang thinks that
dereferencing a pointer to a struct results in a value in the address space
that the pointer points to. A value is just a value, it shouldn't live in a
particular address space:
__kernel void entry(__global int * buffer)
{
const size_t gid = get_global_id();
int value = buffer[gid] * 2; // no address space
buffer[gid] = value;
}
Can someone explain this please? (Assume that I know nothing - it's not that
far from truth!)
Anton.
More information about the cfe-commits
mailing list