[Bug fortran/66128] ICE for some intrinsics with zero sized array parameter

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 7 19:03:00 GMT 2018


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.


More information about the Gcc-bugs mailing list