2 ! { dg-options "-std=f2003 -fall-intrinsics" }
5 ! Test PROTECTED attribute. Within the module everything is allowed.
6 ! Outside (use-associated): For pointers, their association status
7 ! may not be changed. For nonpointers, their value may not be changed.
14 integer, target
:: at
,bt
15 integer, pointer :: ap
,bp
27 call increment(a
,ap
,at
)
28 if(a
/= 44 .or
. ap
/= 74 .or
. at
/= 4) call abort()
29 end subroutine setValue
30 subroutine increment(a1
,a2
,a3
)
31 integer, intent(inout
) :: a1
, a2
, a3
35 end subroutine increment
46 if(a
/= 44 .or
. ap
/= 74 .or
. at
/= 4) call abort()
48 if(a
/= 44 .or
. ap
/= 79 .or
. at
/= 4) call abort()
49 call checkVal(a
,ap
,at
)
52 integer, intent(inout
) :: j
55 subroutine checkVal(x
,y
,z
)
56 integer, intent(in
) :: x
, y
, z
57 if(a
/= 44 .or
. ap
/= 79 .or
. at
/= 4) call abort()