fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / omp_clauses1.f90
blob8851101b92c7ac659fd87d6e05a9d1ffbbd2ae35
1 ! { dg-do compile }
2 subroutine test1
3 integer :: i, j, k, l
4 common /b/ j, k
5 !$omp parallel shared (i) private (/b/)
6 !$omp end parallel
7 !$omp parallel do shared (/b/), firstprivate (i), lastprivate (i)
8 do l = 1, 10
9 end do
10 !$omp end parallel do
11 !$omp parallel shared (j) private (/b/) ! { dg-error "'j' present on multiple clauses" }
12 !$omp end parallel
13 !$omp parallel shared (j, j) private (i) ! { dg-error "'j' present on multiple clauses" }
14 !$omp end parallel
15 !$omp parallel firstprivate (i, j, i) ! { dg-error "'i' present on multiple clauses" }
16 !$omp end parallel
17 !$omp parallel shared (i) private (/b/, /b/) ! { dg-error "'\[jk\]' present on multiple clauses" }
18 !$omp end parallel
19 !$omp parallel shared (i) reduction (+ : i, j) ! { dg-error "'i' present on multiple clauses" }
20 !$omp end parallel
21 !$omp parallel do shared (/b/), firstprivate (/b/), lastprivate (i) ! { dg-error "'\[jk\]' present on multiple clauses" }
22 do l = 1, 10
23 end do
24 !$omp end parallel do
25 end subroutine test1