Nvptx currently doesn't support atomics if it involves a stack address.
PR97444 is open about.
Xfail corresponding execution fails in gcc.dg/atomic. Tested on nvptx.
gcc/testsuite/ChangeLog:
2020-10-15 Tom de Vries <tdevries@suse.de>
* gcc.dg/atomic/c11-atomic-exec-6.c: Xfail execution for nvptx.
* gcc.dg/atomic/c11-atomic-exec-7.c: Same.
* gcc.dg/atomic/stdatomic-op-5.c: Same.
still occurs. */
/* { dg-do run } */
/* { dg-options "-std=c11 -pedantic-errors" } */
+/* { dg-xfail-run-if "PR97444: stack atomics" { nvptx*-*-* } }*/
#define TEST_POINTER_ADD_SUB(TYPE) \
do \
we generate correct code. */
/* { dg-do run } */
/* { dg-options "-std=c11 -pedantic-errors -fdump-tree-original" } */
+/* { dg-xfail-run-if "PR97444: stack atomics" { nvptx*-*-* } }*/
#include <stdatomic.h>
#include <limits.h>
we generate correct code. */
/* { dg-do run } */
/* { dg-options "-std=c11 -pedantic-errors -fdump-tree-original" } */
+/* { dg-xfail-run-if "PR97444: stack atomics" { nvptx*-*-* } }*/
#include <stdatomic.h>