From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8049 invoked by alias); 3 Feb 2011 23:04:39 -0000 Received: (qmail 8040 invoked by uid 22791); 3 Feb 2011 23:04:38 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 Feb 2011 23:04:34 +0000 From: "townsend at astro dot wisc.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47546] Internal error - free_pi_tree(): Unresolved fixup X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: townsend at astro dot wisc.edu X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 03 Feb 2011 23:04:00 -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 X-SW-Source: 2011-02/txt/msg00587.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47546 --- Comment #18 from Rich Townsend 2011-02-03 23:04:22 UTC --- (In reply to comment #8) > This is a *very* strange bug, to say the least. Here is a reduced test case: > > > module hydro_types > implicit none > end module hydro_types > > module hydro_state > implicit none > type :: state_t > real :: U > integer :: n > end type > private > public :: state_t > contains > subroutine init > type(state_t) :: this > end subroutine init > end module hydro_state > > module hydro_speeds > use hydro_state > implicit none > contains > subroutine speeds_cell (st, c_l, c_r) > class(state_t) :: st > real :: c_l(st%n) > real :: c_r(st%n) > end subroutine speeds_cell > end module hydro_speeds > > module hydro_fluxes > use hydro_state > use hydro_speeds > end module Here's an interesting observation: if the definitions of c_l and c_r are changed to real :: c_l(:) real :: c_r(:) (i.e., assumed shape rather than explicit shape), then the problem goes away. In the interests of full disclosure, I should add that this is how I intended to code the speeds_cell routine in the first place -- I have no real need of the explicit shapes, assumed shapes are just fine. So, this bug becomes much less of a showstopper for me.