This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/45827] [4.6 Regression] [OOP] mio_component_ref(): Component not found


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]