https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116886

--- Comment #4 from anlauf at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #2)
> The behavior for simplification is correct, as far as I understand:
> 
> $ cat mv2.f90
> program memain
>   integer, dimension(0,0), parameter :: empty = reshape([(0,i=1,0)],[0,0])
>   print *,maxval(empty)
>   print *,minval(empty)
> end program memain
> $ gfortran mv2.f90 && ./a.out
>  -2147483648
>   2147483647

I guess you meant to add dim=1 as in:

program memain
  integer, dimension(0,0), parameter :: empty = reshape([(0,i=1,0)],[0,0])
  print *,maxval(empty,dim=1)
  print *,minval(empty,dim=1)
end program memain

This prints 2 empty lines (as expected).

Reply via email to