1! PR fortran/92977
2! { dg-do compile }
3! { dg-additional-options "-O2" }
4
5program pr92977
6 integer :: n = 1
7 integer :: a
8!$omp atomic write
9 a = f(n) - f(n)
10contains
11 integer function f(x)
12 integer, intent(in) :: x
13 f = x
14 end
15end
16