Daily bump.
[official-gcc.git] / gcc / testsuite / gfortran.dg / bounds_check_11.f90
blob648e1d3ab610d2f6acf5a77e560dbf03a2254245
1 ! { dg-do run }
2 ! { dg-options "-fbounds-check" }
3 ! { dg-shouldfail "Array bound checking" }
4 ! PR fortran/33745
6 ! Don't check upper bound of assumed-size array
9 program test
10 implicit none
11 integer, parameter :: maxss=7,maxc=8
12 integer :: jp(2,maxc)
13 call findphase(jp)
14 contains
15 subroutine findphase(jp)
16 integer, intent(out) :: jp(2,*)
17 jp(2,2:4)=0
18 jp(2,0:4)=0 ! { dg-warning "out of bounds" }
19 jp(3,1:4)=0 ! { dg-warning "out of bounds" }
20 end subroutine
21 end program test
23 ! { dg-output "At line 18 of file .*" }
24 ! { dg-output "Array reference out of bounds, lower bound of dimension 2 of array 'jp' exceeded .0 < 1." }