2 ! PR fortran/100607 - fix diagnostics for SELECT RANK
3 ! Contributed by T.Burnus
7 integer, allocatable
:: A(:,:,:)
9 allocate(a(5:6,-2:2, 99:100))
16 integer, allocatable
:: x(..)
17 if (rank(x
) /= 3) stop 1
18 if (any (lbound(x
) /= [5, -2, 99])) stop 2
22 if (any (lbound(x
) /= [5, -2, 99])) stop 3
25 select
rank (x
) ! { dg-error "pointer or allocatable selector at .2." }
26 rank(*) ! { dg-error "pointer or allocatable selector at .2." }
27 if (rank(x
) /= 1) stop 4
28 if (lbound(x
, 1) /= 1) stop 5
34 if (rank(x
) /= 3) stop 6
35 if (any (lbound(x
) /= 1)) stop 7
39 if (any (lbound(x
) /= 1)) stop 8
44 if (rank(x
) /= 1) stop 9
45 if (lbound(x
, 1) /= 1) stop 10