From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24278 invoked by alias); 27 Dec 2010 22:18:50 -0000 Received: (qmail 24269 invoked by uid 22791); 27 Dec 2010 22:18:49 -0000 X-SWARE-Spam-Status: No, hits=-2.9 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; Mon, 27 Dec 2010 22:18:43 +0000 From: "dfranke at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45827] [4.6 Regression] [OOP] mio_component_ref(): Component not found X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dfranke at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: janus at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.0 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: Mon, 27 Dec 2010 22:18: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: 2010-12/txt/msg02708.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45827 --- Comment #36 from Daniel Franke 2010-12-27 22:18:27 UTC --- (In reply to comment #35) > Yes, I think I know what's going on. One way to fix it is the following: I managed to get an ICE with your version (sym == NULL), this seems to work (not regtested): Index: module.c =================================================================== --- module.c (revision 168256) +++ module.c (working copy) @@ -2311,6 +2311,9 @@ { mio_internal_string (name); + if (sym && sym->attr.is_class) + sym = sym->components->ts.u.derived; + /* It can happen that a component reference can be read before the associated derived type symbol has been loaded. Return now and wait for a later iteration of load_needed. */