The NVPTX low latency memory is not accessible outside the team that allocates it, and therefore should be unavailable for allocators with the access trait "all". This change means that the omp_low_lat_mem_alloc predefined allocator now implicitly implies the "pteam" trait. libgomp/ChangeLog: * allocator.c (MEMSPACE_VALIDATE): New macro. (omp_aligned_alloc): Use MEMSPACE_VALIDATE. (omp_aligned_calloc): Likewise. (omp_realloc): Likewise. * config/nvptx/allocator.c (nvptx_memspace_validate): New function. (MEMSPACE_VALIDATE): New macro. * testsuite/libgomp.c/omp_alloc-4.c (main): Add access trait. * testsuite/libgomp.c/omp_alloc-6.c (main): Add access trait. * testsuite/libgomp.c/omp_alloc-traits.c: New test. --- libgomp/allocator.c | 16 +++++ libgomp/config/nvptx/allocator.c | 11 +++ libgomp/testsuite/libgomp.c/omp_alloc-4.c | 7 +- libgomp/testsuite/libgomp.c/omp_alloc-6.c | 7 +- .../testsuite/libgomp.c/omp_alloc-traits.c | 68 +++++++++++++++++++ 5 files changed, 103 insertions(+), 6 deletions(-) create mode 100644 libgomp/testsuite/libgomp.c/omp_alloc-traits.c