libatomic isn't built for amdgcn but reduction-16.c adds it
via -foffload=-latomic when offloading for nvptx is enabled.
The following avoids linker errors when offloading to amdgcn is enabled
as well.
2021-04-21 Richard Biener <rguenther@suse.de>
libgomp/
* testsuite/libgomp.c-c++-common/reduction-16.c: Use -latomic
only on nvptx-none.
/* { dg-do run } */
-/* { dg-additional-options "-foffload=-latomic" { target offload_target_nvptx } } */
+/* { dg-additional-options "-foffload=nvptx-none=-latomic" { target offload_target_nvptx } } */
#include <stdlib.h>