From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52920 invoked by alias); 18 Oct 2015 21:30:37 -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 52831 invoked by uid 48); 18 Oct 2015 21:30:33 -0000 From: "mikael at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/67933] [4.9/5/6 Regression] ICE for array of a derived type with allocatable class in derived type object Date: Sun, 18 Oct 2015 21:30: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: 6.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: mikael at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc blocked 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-10/txt/msg01446.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67933 Mikael Morin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mikael at gcc dot gnu.org Blocks|37336 | --- Comment #2 from Mikael Morin --- The generated finalization wrapper has code doing deallocate(ptr2%classes(:)%class_var) where ptr2 is a pointer of type list_t to be finalized. This is missing scalarization, a correct code would do instead: do i=1,size(ptr2) ptr3 => ptr2%classes(i) deallocate (ptr3%class_var) end do Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336 [Bug 37336] [F03] Finish derived-type finalization