host_assoc_function_3.f90
来自「用于进行gcc测试」· F90 代码 · 共 28 行
F90
28 行
! { dg-do run }! Tests the fix for the bug PR33233, in which the reference to 'x'! in 'inner' wrongly host-associated with the variable 'x' rather! than the function.!! Contributed by Tobias Burnus <burnus@gcc.gnu.org>!MODULE m REAL :: x(3) = (/ 1.5, 2.5, 3.5 /)CONTAINS SUBROUTINE s if (x(2) .eq. 2.5) call abort () CONTAINS FUNCTION x(n, m) integer, optional :: m if (present(m)) then x = REAL(n)**m else x = 0.0 end if END FUNCTION END SUBROUTINE sEND MODULE m use m call send! { dg-final { cleanup-modules "m" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?