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