Debian Codegraph @

gcc/testsuite/gfortran.dg/goacc/omp.f95

raw
1 ! { dg-do compile }
2 ! { dg-additional-options "-fopenmp" }
3
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
15
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
25
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
34
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
43
44 subroutine go
45 implicit none
46 integer :: i, j
47
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
57
58 subroutine roku
59 implicit none
60
61 !$acc data
62 !$omp parallel ! { dg-error "cannot be specified" }
63 !$omp end parallel
64 !$acc end data
65 end subroutine roku
66
67 subroutine nana
68 !$acc parallel &
69 !$omp do ! { dg-error "Wrong OpenACC continuation" }
70 do i = 1, 5 ! { dg-error "The !.OMP DO directive cannot be specified within a !.ACC PARALLEL region" "" { target *-*-* } .-1 }
71 end do
72 !$acc end parallel
73
74 !$omp parallel &
75 !$acc kernels loop ! { dg-error "Wrong OpenMP continuation" }
76 do i = 1, 5 ! { dg-error "The !.ACC KERNELS LOOP directive cannot be specified within a !.OMP PARALLEL region" "" { target *-*-* } .-1 }
77 end do
78 !$omp end parallel
79
80 !$omp parallel &
81 !$acc loop ! { dg-error "Wrong OpenMP continuation" }
82 do i = 1, 5 ! { dg-error "The !.ACC LOOP directive cannot be specified within a !.OMP PARALLEL region" "" { target *-*-* } .-1 }
83 end do
84 !$omp end parallel
85 end subroutine nana
86 end module test