parent_result_ref_4.f90
来自「用于进行gcc测试」· F90 代码 · 共 25 行
F90
25 行
! { dg-do run }
! Tests the fix for PR19546 in which an ICE would result from
! setting the parent result in a contained procedure.
! Check that parent function results can be referenced in modules.
!module mcontains
function f()
integer :: f
f = 42
call sub ()
if (f.eq.1) f = f + 1
contains
subroutine sub
if (f.eq.42) f = f - 41
end subroutine sub
end function fend module m
use m
if (f ().ne.2) call abort ()
end
! { dg-final { cleanup-modules "m" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?