test_com_block.f90

来自「用于进行gcc测试」· F90 代码 · 共 35 行

F90
35
字号
! { 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 helloend module nonF03ComBlockprogram 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()  endifend program testComBlock! { dg-final { cleanup-modules "nonf03comblock" } }

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?