Retro68/gcc/gcc/testsuite/gfortran.dg/coarray_19.f90
2014-09-21 19:33:12 +02:00

26 lines
432 B
Fortran

! { dg-do compile }
! { dg-options "-fcoarray=single" }
!
! PR fortran/18918
!
! Was failing before as the "x%a()[]" was
! regarded as coindexed
subroutine test2()
type t
integer, allocatable :: a(:)[:]
end type t
type(t), SAVE :: x
allocate(x%a(1)[*])
end subroutine test2
module m
integer, allocatable :: a(:)[:]
end module m
! Was failing as "a" was allocatable but
! as->cotype was not AS_DEFERERED.
use m
end