This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31067] MINLOC should sometimes be inlined (gas_dyn is sooooo sloooow)
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Mar 2007 05:50:25 -0000
- Subject: [Bug fortran/31067] MINLOC should sometimes be inlined (gas_dyn is sooooo sloooow)
- References: <bug-31067-10259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from fxcoudert at gcc dot gnu dot org 2007-03-08 05:50 -------
(In reply to comment #6)
> This makes minloc have rank 0, and allows for
> inlining.
No, it's wrong. See F95 13.14.71: "Result Characteristics. The result is of
type default integer. If DIM is absent, the result is an array of rank one and
of size equal to the rank of ARRAY; otherwise, the result is of rank n-1 and
shape ..."
Note in particular the example for case (i), on the next page: "The value of
MINLOC((/4,3,6,3/)) is [2]". If DIM is absent, the result is always an array of
rank 1. Only if DIM is present, and the ARRAY is of rank 1, then MINLOC is a
scalar: MINLOC((/4,3,6,3/),1) == 2
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31067