https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116886
--- Comment #3 from Mikael Morin <mikael at gcc dot gnu.org> --- (In reply to Thomas Koenig from comment #0) > If I read J3/23-007 16.9.138 correctly, the following program should > print the minimum integer value, twice, but it prints nothing: > > program memain > implicit none > call testit(0) > contains > subroutine testit(n) > integer, intent(in) :: n > integer, dimension(n,n) :: val > print *,maxval(val,dim=1) > end subroutine testit > end program memain > $ /usr/bin/gfortran maxval.f90 > $ ./a.out > > $ If I read the result characteristics specification correctly, with dim=1, the maxval result has rank 1 and shape [0] in the above case, so the empty output makes sense to me. Do I miss something?