------- Comment #10 from janus at gcc dot gnu dot org 2010-08-04 08:32 ------- (In reply to comment #9) > With the patch in comment #5 there is one regression: > > FAIL: gfortran.dg/typebound_operator_4.f03 -O (test for excess errors) > > the extra errors are: > > /opt/gcc/work/gcc/testsuite/gfortran.dg/typebound_operator_4.f03:73.7: > > USE m > 1 > Error: Invalid expression in the derived type constructor for pointer > component > '$extends' at (1) in PURE procedure
This regression can be fixed by: Index: gcc/fortran/resolve.c =================================================================== --- gcc/fortran/resolve.c (revision 162842) +++ gcc/fortran/resolve.c (working copy) @@ -12320,6 +12323,10 @@ gfc_impure_variable (gfc_symbol *sym) gfc_symbol *proc; gfc_namespace *ns; + if (sym->attr.vtab) + return 0; + if (sym->attr.use_assoc || sym->attr.in_common) return 1; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44065