ieee_9.f90: XFAIL on arm*-*-gnueabi[hf].
[official-gcc.git] / gcc / testsuite / gfortran.dg / bounds_check_11.f90
blob6e2cf3e788428ad47fecf71dfaf208fc1b150371
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 "Index '0' of dimension 2 of array 'jp' below lower bound of 1" }