PR fortran/63858
[official-gcc.git] / gcc / testsuite / gfortran.dg / goacc / omp.f95
blob339438ab7728d8e68afdf558a308f0aa3339a232
1 ! { dg-do compile }
2 ! { dg-additional-options "-fopenmp" }
4 module test
5 contains
6 subroutine ichi
7 implicit none
8 integer :: i
9 !$acc parallel
10 !$omp do ! { dg-error "cannot be specified" }
11 do i = 1,5
12 enddo
13 !$acc end parallel
14 end subroutine ichi
16 subroutine ni
17 implicit none
18 integer :: i
19 !$omp parallel
20 !$acc loop ! { dg-error "cannot be specified" }
21 do i = 1,5
22 enddo
23 !$omp end parallel
24 end subroutine ni
26 subroutine san
27 implicit none
28 integer :: i
29 !$omp do
30 !$acc loop ! { dg-error "Unexpected" }
31 do i = 1,5
32 enddo
33 end subroutine san
35 subroutine yon
36 implicit none
37 integer :: i
38 !$acc loop
39 !$omp do ! { dg-error "Expected DO loop" }
40 do i = 1,5
41 enddo
42 end subroutine yon
44 subroutine go
45 implicit none
46 integer :: i, j
48 !$omp parallel
49 do i = 1,5
50 !$acc kernels ! { dg-error "cannot be specified" }
51 do j = 1,5
52 enddo
53 !$acc end kernels
54 enddo
55 !$omp end parallel
56 end subroutine go
58 subroutine roku
59 implicit none
61 !$acc data
62 !$omp parallel ! { dg-error "cannot be specified" }
63 !$omp end parallel
64 !$acc end data
65 end subroutine roku
67 subroutine nana
68 !$acc parallel &
69 !$omp do ! { dg-error "Wrong OpenACC continuation" }
71 !$omp parallel &
72 !$acc loop ! { dg-error "Wrong OpenMP continuation" }
73 end subroutine nana
74 end module test