1! { dg-do compile }
2! { dg-options "-fcoarray=lib" }
3type t
4  integer :: x
5end type t
6
7class(t), allocatable :: a[:]
8allocate(t :: a[*])
9a%x = this_image()
10
11call foo(a[i]) ! { dg-error "Coindexed polymorphic actual argument at .1. is passed polymorphic dummy argument" }
12contains
13subroutine foo(y)
14  class(t) :: y
15  print *, y%x
16end subroutine foo
17end
18