[Bug libfortran/31726] minloc/maxloc: wrong results with empty array (F2003 only)

pault at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Jun 24 11:04:00 GMT 2007



------- Comment #9 from pault at gcc dot gnu dot org  2007-06-24 11:04 -------
Subject: Bug 31726

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



More information about the Gcc-bugs mailing list