2 ! { dg-options "-fcoarray=single" }
5 ! LOCK/LOCK_TYPE checks
12 type(lock_type
) :: lock
16 type(lock_type
), allocatable
:: lock(:)[:]
20 type(t2
), save :: b
! OK
22 allocate(b
%lock(1)[*])
27 LOCK(b
%lock(1)[1]) ! OK
34 type(lock_type
) :: lock
36 type(t
), save :: a
! { dg-error "type LOCK_TYPE or with subcomponent of type LOCK_TYPE must be a coarray" }
37 end subroutine invalid
43 type(lock_type
) :: a
! OK
47 type(lock_type
), allocatable
:: c2(:)[:] ! OK
52 type(lock_type
), allocatable
:: c1(:) ! { dg-error "Allocatable component c1 at .1. of type LOCK_TYPE must have a codimension" }
58 type(t3
) :: x3
! { dg-error "of type LOCK_TYPE or with subcomponent of type LOCK_TYPE must be a coarray" }
61 type(lock_type
) :: c0(2)
63 type(t4
) :: x4
! { dg-error "of type LOCK_TYPE or with subcomponent of type LOCK_TYPE must be a coarray" }
64 end subroutine more_tests