| 1 |
! { dg-do compile } |
| 2 |
! |
| 3 |
! PR fortran/103039 |
| 4 |
! |
| 5 |
|
| 6 |
subroutine shared_test(cc, ar) |
| 7 |
implicit none |
| 8 |
class(*) :: cc |
| 9 |
integer :: ar(..) |
| 10 |
|
| 11 |
associate(aa => cc) |
| 12 |
!$omp parallel shared(aa) ! { dg-error "Associate name 'aa' in SHARED clause" } |
| 13 |
!$omp end parallel |
| 14 |
end associate |
| 15 |
|
| 16 |
select type(tt => cc) |
| 17 |
type is (integer) |
| 18 |
!$omp parallel shared(tt) ! { dg-error "Associate name 'tt' in SHARED clause" } |
| 19 |
!$omp end parallel |
| 20 |
end select |
| 21 |
|
| 22 |
select type(cc) |
| 23 |
type is (integer) |
| 24 |
!$omp parallel shared(cc) ! { dg-error "Associate name 'cc' in SHARED clause" } |
| 25 |
!$omp end parallel |
| 26 |
end select |
| 27 |
|
| 28 |
select rank(rr => ar) |
| 29 |
rank(1) |
| 30 |
!$omp parallel shared(rr) ! { dg-error "Associate name 'rr' in SHARED clause" } |
| 31 |
!$omp end parallel |
| 32 |
end select |
| 33 |
|
| 34 |
select rank(ar) |
| 35 |
rank(1) |
| 36 |
!$omp parallel shared(ar) ! { dg-error "Associate name 'ar' in SHARED clause" } |
| 37 |
!$omp end parallel |
| 38 |
end select |
| 39 |
end |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
subroutine firstprivate_test(cc, ar) |
| 44 |
implicit none |
| 45 |
class(*) :: cc |
| 46 |
integer :: ar(..) |
| 47 |
|
| 48 |
associate(aa => cc) |
| 49 |
!$omp parallel firstprivate(aa) ! { dg-error "Associate name 'aa' in FIRSTPRIVATE clause" } |
| 50 |
!$omp end parallel |
| 51 |
end associate |
| 52 |
|
| 53 |
select type(tt => cc) |
| 54 |
type is (integer) |
| 55 |
!$omp parallel firstprivate(tt) ! { dg-error "Associate name 'tt' in FIRSTPRIVATE clause" } |
| 56 |
!$omp end parallel |
| 57 |
end select |
| 58 |
|
| 59 |
select type(cc) |
| 60 |
type is (integer) |
| 61 |
!$omp parallel firstprivate(cc) ! { dg-error "Associate name 'cc' in FIRSTPRIVATE clause" } |
| 62 |
!$omp end parallel |
| 63 |
end select |
| 64 |
|
| 65 |
select rank(rr => ar) |
| 66 |
rank(1) |
| 67 |
!$omp parallel firstprivate(rr) ! { dg-error "Associate name 'rr' in FIRSTPRIVATE clause" } |
| 68 |
!$omp end parallel |
| 69 |
end select |
| 70 |
|
| 71 |
select rank(ar) |
| 72 |
rank(1) |
| 73 |
!$omp parallel firstprivate(ar) ! { dg-error "Associate name 'ar' in FIRSTPRIVATE clause" } |
| 74 |
!$omp end parallel |
| 75 |
end select |
| 76 |
end |