bounds_check_11.f90

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

F90
26
字号
! { dg-do run }! { dg-options "-fbounds-check" }! { dg-shouldfail "Array bound checking" }! PR fortran/33745!! Don't check upper bound of assumed-size array!program test implicit none integer, parameter :: maxss=7,maxc=8 integer :: jp(2,maxc) call findphase(jp)contains  subroutine findphase(jp)    integer, intent(out) :: jp(2,*)    jp(2,2:4)=0    jp(2,0:4)=0 ! { dg-warning "out of bounds" }    jp(3,1:4)=0 ! { dg-warning "out of bounds" }  end subroutineend program test! { dg-output "At line 18 of file .*" }! { dg-output "Array reference out of bounds, lower bound of dimension 2 of array 'jp' exceeded .0 < 1." }

⌨️ 快捷键说明

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