2 ! { dg-options "-fcoarray=single" }
4 ! Constraint checks for invalid access of remote pointers
5 ! (Accessing the value is ok, checking/changing association
11 integer, pointer :: ptr
=> null()
15 if (associated(x
%ptr
)) stop 0
16 if (associated(x
%ptr
,y
%ptr
)) stop 0
18 if (associated(x
[1]%ptr
)) stop 0 ! { dg-error "shall not be coindexed" }
19 if (associated(x
%ptr
,y
[1]%ptr
)) stop 0 ! { dg-error "shall not be coindexed" }
22 nullify (x
[1]%ptr
) ! { dg-error "shall not be coindexed" }
25 x
%ptr
=> null(x
[1]%ptr
) ! { dg-error "shall not be coindexed" }
26 x
[1]%ptr
=> null(x
%ptr
) ! { dg-error "shall not have a coindex" }
31 allocate(x
[1]%ptr
) ! { dg-error "Coindexed allocatable object" }
32 deallocate(x
[1]%ptr
) ! { dg-error "Coindexed allocatable object" }