! { dg-do compile }
!
! PR fortran/18918
!
! Coarray expressions - FAILING because of PR fortran/43412
!
module mod2
  implicit none
  type t
  end type t
end module mod2

subroutine procTest
  use mod2
  implicit none
  class(t), allocatable :: z[:] ! FIXME: OK, fails due to "sym->attr.allocatable == 0" issue
  allocate(t :: z[*]) ! { dg-error "Sorry" } FIXME: fails earlier due to "sym->as" issue
end subroutine procTest


module mintr1
  type t
   integer, allocatable :: a(:)
  end type t
contains
  ! C617/C1228
  subroutine test(x)
    class(t) :: x[*]
    print *, size(x[1]%a)
    print *, allocated(x[1]%a)
    print *, shape(x[1]%a)
  end subroutine test
end module mintr1

! TODO: 12.5.2.4 Ordinary dummy variables
! "If the actual argument is a polymorphic coindexed object,
!  the dummy argument shall not be polymorphic."

! { dg-final { cleanup-modules "mod2 mintr1" } }
