2 ! { dg-options "-fbounds-check" }
4 integer, parameter :: nx
= 3, ny
= 4
6 integer :: i
, j
, too_big
8 integer, parameter, dimension(nx
,ny
) :: p
= &
9 reshape((/ (i
*i
, i
=1,size(p
)) /), shape(p
))
11 integer, dimension(nx
,ny
) :: a
13 integer, dimension(:), allocatable
:: c
21 c
= sum(a(1:too_big
,:),2)
23 ! { dg-shouldfail "outside of expected range" }