1! { dg-do run } 2! 3! TS 29113 4! 6.3 Argument association 5! An assumed-rank dummy argument may correspond to an actual argument of 6! any rank. If the actual argument has rank zero, the dummy argument has 7! rank zero; the shape is a zero-sized array and the LBOUND and UBOUND 8! intrinsic functions, with no DIM argument, return zero-sized 9! arrays. [...] 10 11program test 12 13 call testit (42) 14 15contains 16 17 subroutine testit (x0) 18 integer :: x0(..) 19 20 ! expect to have rank 0 21 if (rank (x0) .ne. 0) stop 101 22 23 ! expect shape to be a zero-sized array 24 if (size (shape (x0)) .ne. 0) stop 102 25 26 ! expect lbound and ubound functions to return zero-sized arrays 27 if (size (lbound (x0)) .ne. 0) stop 103 28 if (size (ubound (x0)) .ne. 0) stop 104 29 end subroutine 30 31end program 32