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] - Blame information for rev 774

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
module nonF03ComBlock
3
  common /NONF03COM/ r, s
4
  real :: r
5
  real :: s
6
 
7
  contains
8
 
9
    subroutine hello(myArray)
10
      integer, dimension(:) :: myArray
11
 
12
      r = 1.0
13
      s = 2.0
14
    end subroutine hello
15
end module nonF03ComBlock
16
 
17
program testComBlock
18
  use nonF03ComBlock
19
  integer, dimension(1:10) :: myArray
20
 
21
  call hello(myArray)
22
 
23
  ! these are set in the call to hello() above
24
  ! r and s are reals (default size) in com block, set to
25
  ! 1.0 and 2.0, respectively, in hello()
26
  if(r .ne. 1.0) then
27
     call abort()
28
  endif
29
  if(s .ne. 2.0) then
30
     call abort()
31
  endif
32
end program testComBlock
33
 
34
! { dg-final { cleanup-modules "nonf03comblock" } }

powered by: WebSVN 2.1.0

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