URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [coarray_14.f90] - Rev 700
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do compile }! { dg-options "-fcoarray=single" }!! PR fortran/46370!! Coarray checks!! Check for C1229: "A data-ref shall not be a polymorphic subobject of a! coindexed object." which applies to function and subroutine calls.module mimplicit nonetype tcontainsprocedure, nopass :: sub=>subprocedure, nopass :: func=>funcend type ttype t3type(t) :: nopolyend type t3type t2class(t), allocatable :: polyclass(t3), allocatable :: poly2end type t2containssubroutine sub()end subroutine subfunction func()integer :: funcend function funcend module msubroutine test(x)use mtype(t2) :: x[*]integer :: icall x[1]%poly2%nopoly%sub() ! OKi = x[1]%poly2%nopoly%func() ! OKcall x[1]%poly%sub() ! { dg-error "Polymorphic subobject of coindexed object" }i = x[1]%poly%func() ! { dg-error "Polymorphic subobject of coindexed object" }end subroutine test! Check for C617: "... a data-ref shall not be a polymorphic subobject of a! coindexed object or ..."! Before, the second allocate statment was failing - though it is no subobject.program myTesttype tend type ttype(t), allocatable :: a[:]allocate (t :: a) ! { dg-error "Coarray specification required in ALLOCATE statement" }allocate (t :: a[*]) ! OKend program myTest! { dg-final { cleanup-modules "m" } }
Go to most recent revision | Compare with Previous | Blame | View Log
