[Bug fortran/19015] shape / rank mismatch in maxloc / minloc leads to assertion failure at runtime

tkoenig at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Apr 28 08:10:00 GMT 2005


------- Additional Comments From tkoenig at gcc dot gnu dot org  2005-04-28 08:07 -------
In 4.1, this is now a runtime error:

$ cat maxloc-2.f90
  integer, dimension(0:1,0:1) :: n
  integer, dimension(1) :: i
  n = reshape((/1, 2, 3, 4/), shape(n))
  i = maxloc(n)
  print *,i
end program
$ gfortran maxloc-2.f90
$ ./a.out
Fortran runtime error: dimension of return array incorrect


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19015



More information about the Gcc-bugs mailing list