Debian Codegraph @

gcc/testsuite/gfortran.dg/assumed_rank_3.f90

raw
1 ! { dg-do run }
2 ! { dg-options "-fcheck=bounds" }
3 ! { dg-shouldfail "Array reference out of bounds" }
4 !
5 ! PR fortran/48820
6 !
7 ! Do assumed-rank bound checking
8
9 implicit none
10 integer :: a(4,4)
11 call bar(a)
12 contains
13 subroutine bar(x)
14 integer :: x(..)
15 print *, ubound(x,dim=3) ! << wrong dim
16 end subroutine
17 end
18
19 ! { dg-output "Fortran runtime error: Array reference out of bounds" }