1module mod 2integer i, j 3 4contains 5subroutine foo () 6 integer v 7 !$omp atomic release 8 i = i + 1 9 !$omp atomic read 10 v = j 11end 12end module 13 14module m2 15!$omp requires atomic_default_mem_order (acq_rel) ! OK 16contains 17subroutine bar 18 !$omp atomic release 19 i = i + 1 20!$omp requires atomic_default_mem_order (acq_rel) ! { dg-error "must appear in the specification part of a program unit" } 21 !$omp atomic read 22 v = j 23end subroutine 24end module m2 25