This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/45827] [4.6 Regression] [OOP] mio_component_ref(): Component not found
- From: "dfranke at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 Dec 2010 12:23:05 +0000
- Subject: [Bug fortran/45827] [4.6 Regression] [OOP] mio_component_ref(): Component not found
- Auto-submitted: auto-generated
- References: <bug-45827-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45827
--- Comment #38 from Daniel Franke <dfranke at gcc dot gnu.org> 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.