From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28818 invoked by alias); 7 Feb 2015 11:23:26 -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 28735 invoked by uid 48); 7 Feb 2015 11:23:23 -0000 From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/64932] [4.9/5 Regression] ICE in gfc_conv_descriptor_data_get for generated finalizer Date: Sat, 07 Feb 2015 11:23: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: pault at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc assigned_to attachments.created 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-02/txt/msg00653.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64932 Paul Thomas changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pault at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org --- Comment #3 from Paul Thomas --- Created attachment 34691 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34691&action=edit Patch for the PR class.c(finalize_component) is not able to deal correctly with non-allocatable derived type array components that have finalizable components. Rather than generating loops in finalize_component, I detected the condition in trans-stmt.c(gfc_trans_deallocate) and have called gfc_deallocate_alloc_comp after obtaining the derived type for the array. Happily, this fix does not generate the error: Error: Two or more part references with nonzero rank must not be specified at (1) which occurs if the code is written explicitly. Bootstraps and regtests on FC21/x_86_64 OK for trunk? Paul