pack_bounds_1.f90
来自「用于进行gcc测试」· F90 代码 · 共 11 行
F90
11 行
! { dg-do run }! { dg-options "-fbounds-check" }! { dg-shouldfail "Incorrect extent in return value of PACK intrinsic; is 4, should be 5" }! PR 30814 - a bounds error with pack was not caught.program main integer :: a(2,2), b(5) a = reshape((/ 1, -1, 1, -1 /), shape(a)) b = pack(a, a /= 0)end program main! { dg-output "Fortran runtime error: Incorrect extent in return value of PACK intrinsic; is 4, should be 5" }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?