maxloc_bounds_4.f90
来自「用于进行gcc测试」· F90 代码 · 共 24 行
F90
24 行
! { dg-do run }! { dg-options "-fbounds-check" }! { dg-shouldfail "Incorrect extent in return value of MAXLOC intrnisic: is 3, should be 2" }module tstcontains subroutine foo(res) integer(kind=4), allocatable :: f(:,:) integer, dimension(:) :: res allocate (f(2,5)) f = 3 res = maxloc(f) end subroutine fooend module tstprogram main use tst implicit none integer(kind=4) :: res(3) call foo(res)end program main! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrnisic: is 3, should be 2" }! { dg-final { cleanup-modules "tst" } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?