assumed_charlen_function_5.f90

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

F90
39
字号
! { dg-do compile }! Tests the patch for PR28890, in which a reference to a legal reference! to an assumed character length function, passed as a dummy, would! cause an ICE.!! Contributed by Paul Thomas  <pault@gcc.gnu.org>!character(*) function charrext (n)  ! { dg-warning "is obsolescent in fortran 95" }  character(26) :: alpha ="abcdefghijklmnopqrstuvwxyz"  charrext = alpha (1:n)end function charrext  character(26), external :: charrext  interface    integer(4) function test(charr, i)     character(*), external :: charr     integer :: i    end function test  end interface  do j = 1 , 26    m = test (charrext, j)    m = ctest (charrext, 27 - j)  end docontains  integer(4) function ctest(charr, i)  ! { dg-warning "is obsolescent in fortran 95" }    character(*) :: charr    integer :: i    print *, charr(i)    ctest = 1  end function ctestendinteger(4) function test(charr, i)  ! { dg-warning "is obsolescent in fortran 95" }  character(*) :: charr  integer :: i  print *, charr(i)  test = 1end function test

⌨️ 快捷键说明

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