summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/goacc/omp.f95
blob: 24f639ff54a25d7c79b42ae0f5aa3e5c48bb524a (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
! { dg-do compile } 
! { dg-additional-options "-fopenmp" } 

module test
contains
  subroutine ichi
    implicit none
    integer :: i
    !$acc parallel
    !$omp do ! { dg-error "cannot be specified" }
    do i = 1,5
    enddo
    !$acc end parallel
  end subroutine ichi

  subroutine ni
    implicit none
    integer :: i
    !$omp parallel
    !$acc loop ! { dg-error "cannot be specified" }
    do i = 1,5
    enddo
    !$omp end parallel
  end subroutine ni

  subroutine san
    implicit none
    integer :: i
    !$omp do
    !$acc loop ! { dg-error "Unexpected" }
    do i = 1,5
    enddo
   end subroutine san

   subroutine yon
     implicit none
     integer :: i
     !$acc loop
     !$omp do ! { dg-error "Expected DO loop" }
     do i = 1,5
     enddo
   end subroutine yon

   subroutine go
     implicit none
     integer :: i, j

     !$omp parallel
     do i = 1,5
       !$acc kernels ! { dg-error "cannot be specified" }
       do j = 1,5
       enddo
       !$acc end kernels
     enddo
     !$omp end parallel
   end subroutine go

   subroutine roku
     implicit none

     !$acc data
     !$omp parallel ! { dg-error "cannot be specified" }
     !$omp end parallel
     !$acc end data
   end subroutine roku
end module test