Debian Codegraph @

gcc/testsuite/gfortran.dg/coarray_33.f90

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