📄 assumed_dummy_1.f90
字号:
! { 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -