On 9/8/20 8:51 AM, Tom de Vries wrote:

Add nvptx support to libatomic.

I tried it on powerpc64le-none-linux-gnu and that solves the
__sync_val_compare_and_swap_16 issue, I reported at
https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553070.html

However, when trying Jakub's example (see below; syntax fixed
version), https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553142.html
it (still) fails with:

atomic.c: In function 'main._omp_fn.0':
atomic.c:6:11: internal compiler error: in write_fn_proto, at 
config/nvptx/nvptx.c:913
    6 |   #pragma omp target

Tobias

PS: The 'atomic.c' testcase:

__uint128_t v;
#pragma omp declare target (v)
int
main ()
{
  #pragma omp target
  {
    __atomic_add_fetch (&v, 1, __ATOMIC_RELAXED);
    __atomic_fetch_add (&v, 1, __ATOMIC_RELAXED);
    __uint128_t exp = 2;
    __atomic_compare_exchange_n (&v, &exp, 7, 0, __ATOMIC_RELEASE, 
__ATOMIC_ACQUIRE);
  }
}

-----------------
Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany
Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander 
Walter

Reply via email to