1 ! Program to test the upper and lower bound intrinsics
4 real, dimension(:, :), allocatable
:: a
5 integer, dimension(5) :: j
8 ! Check compile time simplification
9 if (lbound(j
,1).ne
.1 .or
. ubound(j
,1).ne
.5) call abort ()
11 allocate (a(3:8, 6:7))
16 if (j(3) .ne
. 8) call abort
17 if (j(4) .ne
. 7) call abort
19 ! With two parameters, assigning to an array
21 if ((j(1) .ne
. 3) .or
. (j(5) .ne
. 3)) call abort
23 ! With a variable second parameter
26 if (i
.ne
. 6) call abort
31 real, dimension (1:, 1:) :: a
35 if ((ubound(a
, 1) .ne
. 6) .or
. (ubound(a
, i
) .ne
. 2)) call abort