From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4318 invoked by alias); 28 Dec 2010 12:23:11 -0000 Received: (qmail 4307 invoked by uid 22791); 28 Dec 2010 12:23:10 -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; Tue, 28 Dec 2010 12:23:06 +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: Tue, 28 Dec 2010 12:23: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/msg02730.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45827 --- Comment #38 from Daniel Franke 2010-12-28 12:22:48 UTC --- Created attachment 22856 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22856 testcase, ICE with patch in comment #35 (In reply to comment #37) > > I managed to get an ICE with your version (sym == NULL) > > No, that's not possible. My version (i.e. comment #35) is inserted at a > slightly different place than yours, where the existence of 'sym' is already > established. Err, sure it is possible: + if (sym->attr.is_class) + sym = sym->components->ts.u.derived; After this, sym is not checked any more and the ICE occurs in the next line: if (sym->components != NULL && p->u.pointer == NULL) ^^^ That's why I moved it up a few lines and double check that sym really is non-NULL.