From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48426 invoked by alias); 23 Jun 2015 09:07:58 -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 47196 invoked by uid 55); 23 Jun 2015 09:07:54 -0000 From: "vehre at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/64674] [OOP] ICE in ASSOCIATE with class array Date: Tue, 23 Jun 2015 09:07: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: 5.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: vehre at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: vehre 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: 2015-06/txt/msg02265.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64674 --- Comment #5 from vehre at gcc dot gnu.org --- Author: vehre Date: Tue Jun 23 09:07:22 2015 New Revision: 224827 URL: https://gcc.gnu.org/viewcvs?rev=224827&root=gcc&view=rev Log: gcc/fortran/ChangeLog: 2015-06-23 Andre Vehreschild PR fortran/64674 * parse.c (parse_associate): Figure the rank and as of a class array in an associate early. * primary.c (gfc_match_varspec): Prevent setting the dimension attribute on the sym for classes. * resolve.c (resolve_variable): Correct the component ref's type for associated variables. Add a full array ref when class array's are associated. (resolve_assoc_var): Correct the type of the symbol, when in the associate the expression's rank becomes scalar. * trans-expr.c (gfc_conv_variable): Indirect ref needed for allocatable associated objects. gcc/testsuite/ChangeLog: 2015-06-23 Andre Vehreschild PR fortran/64674 * gfortran.dg/associate_18.f08: New test. Added: trunk/gcc/testsuite/gfortran.dg/associate_18.f08 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/parse.c trunk/gcc/fortran/primary.c trunk/gcc/fortran/resolve.c trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog