OSDN Git Service

gcc/fortran:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / test_com_block.f90
1 ! { 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