OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [coarray/] [registering_1.f90] - Rev 749

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do run }
!
! PR fortran/18918
!
! Check whether registering coarrays works
!
module m
  integer :: a(1)[*] = 7
end module m

use m
if (any (a /= 7)) call abort()
a = 88
if (any (a /= 88)) call abort()

 block
   integer :: b[*] = 8494
   if (b /= 8494) call abort()
 end block

if (any (a /= 88)) call abort()
call test ()
end

subroutine test()
  real :: z[*] = sqrt(2.0)
  if (z /= sqrt(2.0)) call abort()
  call sub1()
contains
  subroutine sub1
    real :: r[4,*] = -1
    if (r /= -1) call abort
    r = 10
    if (r /= 10) call abort
  end subroutine sub1

  subroutine uncalled()
     integer :: not_refed[2:*] = 784
     if (not_refed /= 784) call abort()
  end subroutine uncalled
end subroutine test

! { dg-final { cleanup-modules "m" } }

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.