This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

minloc/minval on empty array


Please consider:

$> cat minloc.f90
PRINT *, MINLOC((/ 42, 23 /), DIM=1, MASK=.FALSE.)
PRINT *, MINVAL((/ 42, 23 /), DIM=1, MASK=.FALSE.)
END

$> gfotran-4.2 -g -Wall minloc.f90 && ./a.out
          1
 2147483647

While I can see why HUGE is returned by MINVAL, the location of '1'
given by MINLOC seems to be debatable (same for MAXLOC). SUN and INTEL
return '0' here. Is there a rationale for returning '1'?

Regards
   Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]