https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116886
Bug ID: 116886
Summary: maxval/minval should not return empty result for empty
array
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
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
$