------- Comment #5 from anlauf at gmx dot de 2009-12-16 21:16 ------- (In reply to comment #3) > One can get rid of this by making the vtypes private: > > Index: gcc/fortran/symbol.c > =================================================================== > --- gcc/fortran/symbol.c (revision 155182) > +++ gcc/fortran/symbol.c (working copy) > @@ -4764,6 +4764,7 @@ gfc_find_derived_vtab (gfc_symbol *derived) > return NULL; > vtype->refs++; > gfc_set_sym_referenced (vtype); > + vtype->attr.access = ACCESS_PRIVATE; > > /* Add component '$hash'. */ > if (gfc_add_component (vtype, "$hash", &c) == FAILURE) > > This patch fixes the error and is regression free.
I just tried the patch on my original example and found that this fixes the first error. But I am still left with: gfcbug96.f90:43.23: use concrete_gradient 1 Error: The element in the derived type constructor at (1), for pointer component '$extends', is DERIVED but should be DERIVED -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42353