https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66128
--- Comment #17 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- Here's a problem with maxval: $ cat maxval_parameter_2.f90 ! { dg-do run } program main integer, dimension(0,3), parameter :: i = 0 integer, dimension(0,3) :: j = 0 print *,maxval(i,dim=1) print *,maxval(j,dim=1) end program main $ gfortran maxval_parameter_2.f90 $ ./a.out -2147483648 -2147483648 -2147483648 -2147483648 The run-time result is correct, the simplified version isn't.