https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128989
Bug ID: 128989
Summary: [GCN] undefined symbol: __atomic_fetch_xor_1 - missing
int8 and int16 atomics
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
CC: ams at gcc dot gnu.org
Target Milestone: ---
The program below fails with:
ld: error: undefined symbol: __atomic_fetch_xor_1
changing 'int8' to 'int16' it fails with:
ld: error: undefined symbol: __atomic_fetch_xor_2
While int32 and int64 are fine.
program fuzz_prog
use omp_lib, only: omp_is_initial_device
use iso_fortran_env
implicit none
integer, parameter :: n = 200, m = 5
integer(kind=int8) :: r2a
integer :: i, j, hf1
integer(8) :: cs
hf1 = 0
r2a = 3_1
!$omp target map(tofrom: hf1)
!$omp masked
hf1 = merge(1, 0, omp_is_initial_device())
!$omp end masked
!$omp end target
!$omp target
!$omp teams reduction(ieor: r2a)
!$omp end teams
!$omp end target
cs = 0
cs = modulo(cs * 31_8 + int(r2a, 8), 2147483629_8)
print '(a,i0)', 'checksum= ', cs
print '(a,i0,a,a)', 'RESULT ran_on_host=', max(hf1, 0), ' check=',
merge('pass', 'fail', cs == 3_8)
end program fuzz_prog
* * *
Example taken from:
https://github.com/sbryngelson/offtarget/blob/master/data/findings/fuzz/gcc-small-int-reduction-atomic-link.f90