https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84697
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> --- There is also a regression here: $ cat a.f90 program main implicit none integer, parameter :: z(0) = 0 print *,minloc(z) end program main $ ./a.out Fortran runtime error: Rank of array needs to be > 0 Error termination. Backtrace: #0 0x4007eb in ??? #1 0x400871 in ??? #2 0x7ff256574a86 in ??? #3 0x400679 in ??? at ../sysdeps/x86_64/start.S:120 #4 0xffffffffffffffff in ??? $ /usr/bin/gfortran a.f90 $ ./a.out 0 And something that didn't work in gcc7, but for a different reason: $ cat b.f90 program main implicit none integer, parameter :: z(0) = 0 print *,minloc(z,mask=z>0) end program main $ gfortran b.f90 $ ./a.out Fortran runtime error: Rank of array needs to be > 0 Error termination. Backtrace: #0 0x4007ed in ??? #1 0x400873 in ??? #2 0x7f89d662aa86 in ??? #3 0x400679 in ??? at ../sysdeps/x86_64/start.S:120 #4 0xffffffffffffffff in ??? $ /usr/bin/gfortran b.f90 $ ./a.out Fortran runtime error: Funny sized logical array Error termination. Backtrace: #0 0x40082c in ??? #1 0x4008b2 in ??? #2 0x7f705fcfda86 in ??? #3 0x400699 in ??? at ../sysdeps/x86_64/start.S:120 #4 0xffffffffffffffff in ??? (/usr/bin/gfortran is gcc version 7.3.0 (SUSE Linux) ).