aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/goacc/atomic-1.f90
blob: 579f0494b7831836b079e68d44856e0a1d08c8eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! { dg-do compile }
!
! PR fortran/93462
!
! Contributed by G. Steinmetz
!
program p
   integer :: n = 1
   integer :: a
!$acc atomic write
   a = f(n) - f(n)
contains
   integer function f(x)
      integer, intent(in) :: x
      f = x
   end
end