2 ! { dg-options "-fcoarray=single" }
4 ! Test the fix for PR91726.
6 ! Contributed by Gerhardt Steinmetz <gscfq@t-online.de>
10 class(*), allocatable
:: a
[:] ! This ICEd
13 class(*), allocatable
:: a(:)[:] ! This was OK
23 integer(4) :: i
= 42_4
24 allocate (a
%a
[*], source
= i
) ! This caused runtime segfaults
25 select
type (z
=> a
%a
) ! ditto
27 if (z
.ne
. 42_4) stop 1
30 subroutine bar
! Arrays always worked
32 allocate (a
%a(3)[*], source
= [1_4, 2_4, 3_4])
33 select
type (z
=> a
%a
)
35 if (any (z
.ne
. [1_4, 2_4, 3_4])) stop 2