elemental_initializer_1.f90

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

F90
36
字号
! { dg-do compile }! Tests the fix for elemental functions not being allowed in! specification expressions in pure procedures.!! Testcase from iso_varying_string by Rich Townsend <rhdt@star.ucl.ac.uk>! The allocatable component has been changed to a pointer for this testcase.!module iso_varying_string  type varying_string     private     character(LEN=1), dimension(:), pointer :: chars  end type varying_string  interface len     module procedure len_  end interface lencontains  pure function char_auto (string) result (char_string)    type(varying_string), intent(in) :: string    character(LEN=len(string))       :: char_string ! Error was here    char_string = ""  end function char_auto  elemental function len_ (string) result (length)    type(varying_string), intent(in) :: string    integer                          :: length    length = 1  end function len_end module iso_varying_string! { dg-final { cleanup-modules "iso_varying_string" } }

⌨️ 快捷键说明

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