2 ! Test the fix for PR38324, in which the bounds were not set correctly for
3 ! constructor assignments with allocatable components.
5 ! Contributed by Dominique d'Humieres <dominiq@lps.ens.fr>
7 integer, parameter :: ik4
= 4
8 integer, parameter :: ik8
= 8
9 integer, parameter :: from
= -1, to = 2
15 integer(4), allocatable
:: ib(:)
17 integer(ik4
), allocatable
:: ia(:)
20 if (any(lbound(ia
) .ne
. -1) .or
. any(ubound(ia
) .ne
. 2)) STOP 1
21 if (any(lbound(ia(:)) .ne
. 1) .or
. any(ubound(ia(:)) .ne
. 4)) STOP 2
22 if (any(lbound(ia(from
:to)) .ne
. 1) .or
. any(ubound(ia(from
:to)) .ne
. 4)) STOP 3
24 if (any(lbound(x
%ib
) .ne
. -1) .or
. any(ubound(x
%ib
) .ne
. 2)) STOP 4
26 if (any(lbound(x
%ib
) .ne
. 1) .or
. any(ubound(x
%ib
) .ne
. 4)) STOP 5
28 if (any(lbound(x
%ib
) .ne
. 1) .or
. any(ubound(x
%ib
) .ne
. 4)) STOP 6
33 integer(4), allocatable
:: ib(:)
35 integer(ik8
), allocatable
:: ia(:)
38 if (any(lbound(ia
) .ne
. -1) .or
. any(ubound(ia
) .ne
. 2)) STOP 7
39 if (any(lbound(ia(:)) .ne
. 1) .or
. any(ubound(ia(:)) .ne
. 4)) STOP 8
40 if (any(lbound(ia(from
:to)) .ne
. 1) .or
. any(ubound(ia(from
:to)) .ne
. 4)) STOP 9
42 if (any(lbound(x
%ib
) .ne
. -1) .or
. any(ubound(x
%ib
) .ne
. 2)) STOP 10
44 if (any(lbound(x
%ib
) .ne
. 1) .or
. any(ubound(x
%ib
) .ne
. 4)) STOP 11
46 if (any(lbound(x
%ib
) .ne
. 1) .or
. any(ubound(x
%ib
) .ne
. 4)) STOP 12