2022-11-04 09:35:42 -07:00

20 lines
458 B
Fortran

! @@name: atomic_restrict.1
! @@type: F-fixed
! @@operation: compile
! @@expect: unspecified
! @@version: omp_3.1
SUBROUTINE ATOMIC_WRONG()
INTEGER:: I
REAL:: R
EQUIVALENCE(I,R)
!$OMP PARALLEL
!$OMP ATOMIC UPDATE
I = I + 1
!$OMP ATOMIC UPDATE
R = R + 1.0
! incorrect because I and R reference the same location
! but have different types
!$OMP END PARALLEL
END SUBROUTINE ATOMIC_WRONG