Debian Codegraph @

gcc/testsuite/gfortran.dg/coarray_19.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fcoarray=single" }
3 !
4 ! PR fortran/18918
5 !
6
7 ! Was failing before as the "x%a()[]" was
8 ! regarded as coindexed
9 subroutine test2()
10 type t
11 integer, allocatable :: a(:)[:]
12 end type t
13 type(t), SAVE :: x
14 allocate(x%a(1)[*])
15 end subroutine test2
16
17
18 module m
19 integer, allocatable :: a(:)[:]
20 end module m
21
22 ! Was failing as "a" was allocatable but
23 ! as->cotype was not AS_DEFERERED.
24 use m
25 end