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 9implicit none 10integer :: a(4,4) 11call bar(a) 12contains 13 subroutine bar(x) 14 integer :: x(..) 15 print *, ubound(x,dim=3) ! << wrong dim 16 end subroutine 17end 18 19! { dg-output "Fortran runtime error: Array reference out of bounds" } 20