At present, pointers passed to builtin functions, including atomic operators, are stripped of their address space properties. This doesn't seem to be deliberate, it just omits to copy them. Not only that, but it forces pointer sizes to Pmode, which isn't appropriate for all address spaces. This patch attempts to correct both issues. It works for GCN atomics and GCN OpenACC gang-private variables. 2018-09-05 Andrew Stubbs Julian Brown gcc/ * builtins.c (get_builtin_sync_mem): Handle address spaces. --- gcc/builtins.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)