From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14060 invoked by alias); 15 Oct 2007 18:24:11 -0000 Received: (qmail 13942 invoked by alias); 15 Oct 2007 18:23:55 -0000 Date: Mon, 15 Oct 2007 18:24:00 -0000 Message-ID: <20071015182355.13941.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/33354] [4.2 only] MINLOC in combination with SUM gives wrong result In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tkoenig at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-10/txt/msg01439.txt.bz2 ------- Comment #11 from tkoenig at gcc dot gnu dot org 2007-10-15 18:23 ------- Subject: Bug 33354 Author: tkoenig Date: Mon Oct 15 18:23:39 2007 New Revision: 129365 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129365 Log: 2007-10-25 Thomas Koenig Paul Thomas 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 PR fortran/33354 * gfortran.dg/minmaxloc_4.f90: New test. Added: branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/minmaxloc_4.f90 Modified: branches/gcc-4_2-branch/gcc/fortran/ChangeLog branches/gcc-4_2-branch/gcc/fortran/trans-intrinsic.c branches/gcc-4_2-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33354