view gcc/testsuite/gfortran.dg/coarray_33.f90 @ 127:4c56639505ff

fix function.c and add CbC-example Makefile
author mir3636
date Wed, 11 Apr 2018 18:46:58 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
! { dg-options "-fcoarray=lib" }
type t
  integer :: x
end type t

class(t), allocatable :: a[:]
allocate(t :: a[*])
a%x = this_image()

call foo(a[i]) ! { dg-error "Coindexed polymorphic actual argument at .1. is passed polymorphic dummy argument" }
contains
subroutine foo(y)
  class(t) :: y
  print *, y%x
end subroutine foo
end