On 4/21/2021 6:56 AM, Richard Biener wrote:
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.

Tested on x86_64-unknown-linux-gnu, OK for trunk and GCC 11 branch?

Thanks.
Richard.

2021-04-21  Richard Biener  <rguent...@suse.de>

libgomp/
        * testsuite/libgomp.c-c++-common/reduction-16.c: Use -latomic
        only on nvptx-none.

OK


Jeff

Reply via email to