This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32298] MINLOC / MAXLOC: off-by one for PARAMETER arrays
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Jun 2007 11:04:16 -0000
- Subject: [Bug fortran/32298] MINLOC / MAXLOC: off-by one for PARAMETER arrays
- References: <bug-32298-14685@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pault at gcc dot gnu dot org 2007-06-24 11:04 -------
Subject: Bug 32298
Author: pault
Date: Sun Jun 24 11:04:02 2007
New Revision: 125983
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125983
Log:
2007-06-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/32298
PR fortran/31726
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
the offset between the loop counter and the position as
defined. Add the offset within the loop so that the mask acts
correctly. Do not advance the location on the basis that it
is zero.
2007-06-24 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31726
* gfortran.dg/minmaxloc_1.f90: New test.
PR fortran/32298
* gfortran.dg/minmaxloc_2.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/minmaxloc_1.f90
trunk/gcc/testsuite/gfortran.dg/minmaxloc_2.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-intrinsic.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32298