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