3 ! From posting by Spectrum to clf on thread entitled "Bounds for array pointer dummy argument".
10 TYPE(T
), TARGET
:: T1( 0:3 )
12 associate( P
=> T1
% I
)
13 call check (lbound (P
, 1), ubound (P
, 1) ,1 , 4)
16 associate( P2
=> T1(:) % I
)
17 call check (lbound (P2
, 1), ubound (P2
, 1) ,1 , 4)
21 call check (lbound (Q
, 1), ubound (Q
, 1) ,0 , 3)
24 associate( Q2
=> T1(:) )
25 call check (lbound (Q2
, 1), ubound (Q2
, 1) ,1 , 4)
28 subroutine check (lbnd
, ubnd
, lower
, upper
)
29 integer :: lbnd
, ubnd
, lower
, upper
30 if (lbnd
.ne
. lower
) STOP 1
31 if (ubnd
.ne
. upper
) STOP 2