view gcc/testsuite/gfortran.dg/coarray_poly_1.f90 @ 128:fe568345ddd5

fix CbC-example
author mir3636
date Wed, 11 Apr 2018 19:32:28 +0900
parents 04ced10e8804
children
line wrap: on
line source

! { dg-do compile }
! { dg-options "-fcoarray=single" }
!
! Test for polymorphic coarrays
!
subroutine s2()
  type t
  end type t
  class(t) :: A(:)[4,2:*] ! { dg-error "is not ALLOCATABLE, SAVE nor a dummy argument" }
  print *, ucobound(a)
  allocate(a) ! { dg-error "must be ALLOCATABLE or a POINTER" }
end