missing_optional_dummy_2.f90

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

F90
41
字号
! { dg-do compile }! Tests the fix for PR29321 and PR29322, in which ICEs occurred for the! lack of proper attention to checking pointers in gfc_conv_function_call.!! Contributed by Olav Vahtras  <vahtras@pdc.kth.se>! and Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>!MODULE myint   TYPE NUM      INTEGER :: R = 0   END TYPE NUM   CONTAINS       FUNCTION FUNC(A,B) RESULT(E)      IMPLICIT NONE      TYPE(NUM)  A,B,E      INTENT(IN) ::  A,B      OPTIONAL B      E%R=A%R      CALL SUB(A,E)      END FUNCTION FUNC      SUBROUTINE SUB(A,E,B,C)      IMPLICIT NONE      TYPE(NUM) A,E,B,C      INTENT(IN)   A,B      INTENT(OUT)  E,C      OPTIONAL B,C      E%R=A%R      END SUBROUTINE SUBEND MODULE myint  if (isscan () /= 0) call abortcontains  integer function isscan (substr)    character(*), optional :: substr    if (.not.present(substr)) isscan = myscan ("foo", "over")  end function isscanend! { dg-final { cleanup-modules "myint" } }

⌨️ 快捷键说明

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