maxloc_bounds_6.f90
来自「用于进行gcc测试」· F90 代码 · 共 17 行
F90
17 行
! { dg-do run }! { dg-options "-fbounds-check" }! { dg-shouldfail "Incorrect extent in MASK argument of MAXLOC intrinsic in dimension 2: is 3, should be 2" }program main integer(kind=4), allocatable :: f(:,:) logical, allocatable :: m(:,:) integer(kind=4) :: res(2) character(len=80) line allocate (f(2,2),m(2,3)) f = 3 m = .true. res = maxloc(f,mask=m) write(line,fmt='(80I1)') resend program main! { dg-output "Fortran runtime error: Incorrect extent in MASK argument of MAXLOC intrinsic in dimension 2: is 3, should be 2" }! { dg-final { cleanup-modules "tst" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?