assumed_dummy_1.f90

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

F90
47
字号
! { dg-do run }! Tests the fix for PRs 19358, 19477, 21211 and 21622.!! Note that this tests only the valid cases with explicit interfaces.!! Contributed by Paul Thomas  <pault@gcc.gnu.org>!module globalcontains  SUBROUTINE goo (x, i)    REAL, DIMENSION(i:)     :: x    integer                 :: i    x (3) = 99.0  END SUBROUTINE gooend module globalSUBROUTINE foo (x, i)  REAL, DIMENSION(i:)       :: x  integer                   :: i  x (4) = 42.0END SUBROUTINE fooprogram test  use global  real, dimension(3)        :: y = 0  integer                   :: j = 2interface  SUBROUTINE foo (x, i)    REAL, DIMENSION(i:)     :: x    integer                 :: i  END SUBROUTINE fooend interface  call foo (y, j)  call goo (y, j)  call roo (y, j)  if (any(y.ne.(/21.0, 99.0, 42.0/))) call abort ()contains  SUBROUTINE roo (x, i)    REAL, DIMENSION(i:)     :: x    integer                 :: i    x (2) = 21.0  END SUBROUTINE rooend program test! { dg-final { cleanup-modules "global" } }

⌨️ 快捷键说明

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