Dear all, dear Paul,

Dominique pointed out that the patch does not fully work and that one gets an ICE:
  internal compiler error: in gfc_release_symbol, at fortran/symbol.c:2531

For some odd reason, it didn't occur for my build, which had some unrelated patch applied. I have not understood why it worked with the unrelated patch. However, I do understand why it fails.

But with valgrind, I see it in all my builds. Fixed by the following patch. (Fixes the patch, valgrind shows now error and the test case still works.)

I will commit it as "obvious" after it regtesting it.

Sorry for the breakage.

Tobias

PS: I do now do the same as for "if (fclass = NULL)"; while I do not quite understand why it works with "gfc_get_namespace (NULL, 0)", it does.

Index: class.c
===================================================================
--- class.c     (Revision 183533)
+++ class.c     (Arbeitskopie)
@@ -422,7 +422,7 @@ gfc_build_class_symbol (gfc_typespec *ts, symbol_a
       c->attr.pointer = 1;
     }
   else if (!fclass->f2k_derived)
-    fclass->f2k_derived = fclass->components->ts.u.derived->f2k_derived;
+    fclass->f2k_derived = gfc_get_namespace (NULL, 0);

   /* Since the extension field is 8 bit wide, we can only have
      up to 255 extension levels.  */


Reply via email to