This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/19015] shape / rank mismatch in maxloc / minloc leads to assertion failure at runtime
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Apr 2005 08:07:57 -0000
- Subject: [Bug fortran/19015] shape / rank mismatch in maxloc / minloc leads to assertion failure at runtime
- References: <20041215165814.19015.Thomas.Koenig@online.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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