summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/gomp/omp_clauses1.f90
blob: 8851101b92c7ac659fd87d6e05a9d1ffbbd2ae35 (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
! { dg-do compile }
      subroutine test1
	integer :: i, j, k, l
	common /b/ j, k
!$omp parallel shared (i) private (/b/)
!$omp end parallel
!$omp parallel do shared (/b/), firstprivate (i), lastprivate (i)
	do l = 1, 10
	end do
!$omp end parallel do
!$omp parallel shared (j) private (/b/) ! { dg-error "'j' present on multiple clauses" }
!$omp end parallel
!$omp parallel shared (j, j) private (i) ! { dg-error "'j' present on multiple clauses" }
!$omp end parallel
!$omp parallel firstprivate (i, j, i) ! { dg-error "'i' present on multiple clauses" }
!$omp end parallel
!$omp parallel shared (i) private (/b/, /b/) ! { dg-error "'\[jk\]' present on multiple clauses" }
!$omp end parallel
!$omp parallel shared (i) reduction (+ : i, j) ! { dg-error "'i' present on multiple clauses" }
!$omp end parallel
!$omp parallel do shared (/b/), firstprivate (/b/), lastprivate (i) ! { dg-error "'\[jk\]' present on multiple clauses" }
	do l = 1, 10
	end do
!$omp end parallel do
      end subroutine test1