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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [test_com_block.f90] - Rev 801

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

! { dg-do run }
module nonF03ComBlock
  common /NONF03COM/ r, s
  real :: r
  real :: s
  
  contains
    
    subroutine hello(myArray)
      integer, dimension(:) :: myArray

      r = 1.0
      s = 2.0
    end subroutine hello
end module nonF03ComBlock

program testComBlock
  use nonF03ComBlock
  integer, dimension(1:10) :: myArray

  call hello(myArray)

  ! these are set in the call to hello() above
  ! r and s are reals (default size) in com block, set to 
  ! 1.0 and 2.0, respectively, in hello()
  if(r .ne. 1.0) then 
     call abort()
  endif
  if(s .ne. 2.0) then
     call abort()
  endif
end program testComBlock

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

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.