This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/32298] MINLOC / MAXLOC: off-by one for PARAMETER arrays



------- 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


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