argument_checking_4.f90

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

F90
22
字号
! { dg-do compile }!! PR fortran/30940program testimplicit noneinterface  subroutine foobar(a)     character(len=1),dimension(4) :: a  end subroutine foobar  subroutine arr(a)     character(len=1),dimension(1,2,1,2) :: a  end subroutine arrend interface  call foobar( [ "bar" ]) ! { dg-warning "contains too few elements" }  call foobar( ["ba ","r33"])  call arr( [ "bar" ]) ! { dg-warning "contains too few elements" }  call arr( reshape(["b","a","r","3"], [2,2]))  call arr( reshape(["b","a"], [1,2])) ! { dg-warning "contains too few elements" }  call arr( reshape(["b","a"], [2,1])) ! { dg-warning "contains too few elements" }end program test

⌨️ 快捷键说明

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