From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24131 invoked by alias); 13 Apr 2014 11:56:29 -0000 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 Received: (qmail 24077 invoked by uid 55); 13 Apr 2014 11:56:24 -0000 From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/58085] Wrong indexing of an array in ASSOCIATE Date: Sun, 13 Apr 2014 11:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pault at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-04/txt/msg00928.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58085 --- Comment #2 from Paul Thomas --- Author: pault Date: Sun Apr 13 11:55:49 2014 New Revision: 209346 URL: http://gcc.gnu.org/viewcvs?rev=209346&root=gcc&view=rev Log: 2014-04-13 Paul Thomas PR fortran/58085 PR fortran/60717 * trans.h: Add 'use_offset' bitfield to gfc_se. * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset' as a trigger to unconditionally recalculate the offset for array slices and constant arrays. trans-expr.c (gfc_conv_intrinsic_to_class): Use it. trans-stmt.c (trans_associate_var): Ditto. (gfc_conv_procedure_call): Ditto. 2014-04-13 Paul Thomas PR fortran/60717 * gfortran.dg/unlimited_polymorphic_17.f90: New test. PR fortran/58085 * gfortran.dg/associate_15.f90: New test. Added: branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/associate_15.f90 branches/gcc-4_9-branch/gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f90 Modified: branches/gcc-4_9-branch/gcc/fortran/ChangeLog branches/gcc-4_9-branch/gcc/fortran/trans-array.c branches/gcc-4_9-branch/gcc/fortran/trans-expr.c branches/gcc-4_9-branch/gcc/fortran/trans-stmt.c branches/gcc-4_9-branch/gcc/fortran/trans.h branches/gcc-4_9-branch/gcc/testsuite/ChangeLog