1! { dg-do run } 2! { dg-options "-fbounds-check" } 3! { dg-shouldfail "Array bound checking" } 4! PR fortran/33745 5! 6! Don't check upper bound of assumed-size array 7! 8 9program test 10 implicit none 11 integer, parameter :: maxss=7,maxc=8 12 integer :: jp(2,maxc) 13 call findphase(jp) 14contains 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 21end program test 22 23! { dg-output "At line 18 of file .*" } 24! { dg-output "Index '0' of dimension 2 of array 'jp' below lower bound of 1" } 25 26