2 ! { dg-options "-std=f2003 " }
11 integer, pointer :: point
14 type(myT
), pointer :: t
28 if(t2
%point
/= 7) STOP 1
31 integer, pointer,intent(in
) :: p
32 type(myT
), pointer, intent(in
) :: t
33 integer, pointer :: tmp
34 if(.not
.associated(p
)) return
37 if (associated(t
)) then
38 ! allocating is valid as we don't change the status
39 ! of the pointer "t", only of it's target
41 if(.not
.associated(t
%point
)) STOP 3
42 if(t
%point
/= 55) STOP 4
47 t
%point
=> null(t
%point
)
51 if(t
%point
/= 27) STOP 5
55 if(t
%point
/= -98) STOP 8
61 integer, intent(out
) :: v
65 type(myT
), intent(inout
) :: comp
66 if(comp
%x
/= -15) STOP 10
67 if(comp
%point
/= 27) STOP 11
71 subroutine nonpointer(t
)
72 type(myT
), intent(in
) :: t
74 if(t
%point
/= 42) STOP 13
76 end subroutine nonpointer