]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/32298 (MINLOC / MAXLOC: off-by one for PARAMETER arrays)
authorThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 15 Oct 2007 18:23:39 +0000 (18:23 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Mon, 15 Oct 2007 18:23:39 +0000 (18:23 +0000)
commit862fecbe586ed7b09143ee48af6ed49e96499b68
tree938c2054369d304b9b356549afdfda4a98cf43ef
parent026b8ce174e19d2c5b87a183edfeffd356c065a5
re PR fortran/32298 (MINLOC / MAXLOC: off-by one for PARAMETER arrays)

2007-10-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
    Paul Thomas  <pault@gcc.gnu.org>

PR fortran/32298
PR fortran/31726
PR fortran/33354
Backport from trunk
* 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-10-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/33354
* gfortran.dg/minmaxloc_4.f90:  New test.

Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
From-SVN: r129365
gcc/fortran/ChangeLog
gcc/fortran/trans-intrinsic.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/minmaxloc_4.f90 [new file with mode: 0644]