1! { dg-do compile }
2! { dg-additional-options "-fcoarray=single" }
3
4module test
5contains
6  subroutine oacc1
7  implicit none
8  integer :: i, j
9  j = 0
10  !$acc parallel
11  critical ! { dg-error "CRITICAL block inside of" }
12    j = j + 1
13  end critical
14  !$acc end parallel
15  end subroutine oacc1
16
17  subroutine oacc2
18  implicit none
19  integer :: i, j
20  j = 0
21  critical
22    !$acc parallel ! { dg-error "OpenACC directive inside of" }
23      j = j + 1
24    !$acc end parallel
25  end critical
26  end subroutine oacc2
27end module test