3 ! Test the fix for PR82923, in which an ICE occurred because the
4 ! character length from 'getchars' scope was being used in the
5 ! automatic allocation of 'mine'.
7 ! Contributed by "Werner Blokbuster" <werner.blokbuster@gmail.com>
12 function getchars(my_len
,my_size
)
13 integer, intent(in
) :: my_len
, my_size
14 character(my_len
) :: getchars(my_size
)
18 function getchars2(my_len
)
19 integer, intent(in
) :: my_len
20 character(my_len
) :: getchars2
22 end function getchars2
26 use m
, only
: getchars
, getchars2
28 character(:), allocatable
:: mine(:)
29 character(:), allocatable
:: mine2
32 ! ICE occured at this line:
34 if (any (mine
.ne
. [('A-', i
= 1, 4)])) stop 1
36 ! The scalar version was fine and this will keep it so:
38 if (mine2
.ne
. 'B--') stop 2