derived_pointer_null_1.f90
来自「linux下编程用 编译软件」· F90 代码 · 共 33 行
F90
33 行
! { dg-do compile }! { dg-options "-std=gnu" }!! Test of fix (patch unknown) for pr19181 and pr21300. This test is based! on the example given in 21300. Note that this can be executed.!! Contributed by Paul Thomas <pault@gnu.org>! TYPE ast_obs real, DIMENSION(:), POINTER :: geopos END TYPE ast_obs TYPE(ast_obs), PARAMETER :: undefined_ast_obs = AST_OBS(NULL()) type(ast_obs) :: my_ast_obs real, target, dimension(10) :: rt my_ast_obs%geopos => rt if (.not.associated (my_ast_obs%geopos)) call abort () call get_null_ast_obs (my_ast_obs) if (associated (my_ast_obs%geopos)) call abort ()CONTAINS SUBROUTINE get_null_ast_obs (obs1) TYPE(ast_obs) :: obs1 obs1 = undefined_ast_obs RETURN END SUBROUTINE get_null_ast_obsEND
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?