http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45827

--- Comment #36 from Daniel Franke <dfranke at gcc dot gnu.org> 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.  */

Reply via email to