| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fcoarray=lib" } |
| 3 |
! |
| 4 |
! |
| 5 |
use iso_fortran_env |
| 6 |
implicit none |
| 7 |
|
| 8 |
type t1 |
| 9 |
type(lock_type), allocatable :: x[:] |
| 10 |
end type t1 |
| 11 |
|
| 12 |
type t2 |
| 13 |
type(lock_type) :: x |
| 14 |
end type t2 |
| 15 |
|
| 16 |
type(t1) :: a |
| 17 |
type(t2) :: b[*] |
| 18 |
!class(lock_type), allocatable :: cl[:] |
| 19 |
|
| 20 |
lock(a%x) ! { dg-error "the lock component of derived type at \\(1\\) is not yet supported" } |
| 21 |
lock(b%x) ! { dg-error "the lock component of derived type at \\(1\\) is not yet supported" } |
| 22 |
!lock(cl) |
| 23 |
|
| 24 |
unlock(a%x) ! { dg-error "the lock component of derived type at \\(1\\) is not yet supported" } |
| 25 |
unlock(b%x) ! { dg-error "the lock component of derived type at \\(1\\) is not yet supported" } |
| 26 |
!unlock(cl) |
| 27 |
end |