http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47745
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from janus at gcc dot gnu.org 2011-02-15 10:22:33 UTC --- (In reply to comment #1) > Note: CLASS(*) -- i.e. unlimited polymorphism -- is not yet supported; > however, > there should be no an internal compiler error. Right. We definitely need a better rejection of CLASS(*). Draft patch: Index: gcc/fortran/decl.c =================================================================== --- gcc/fortran/decl.c (revision 170156) +++ gcc/fortran/decl.c (working copy) @@ -2613,6 +2613,16 @@ gfc_match_decl_type_spec (gfc_typespec *ts, int im ts->type = BT_DERIVED; else { + /* Match CLASS declarations. */ + m = gfc_match (" class ( * )"); + if (m == MATCH_ERROR) + return MATCH_ERROR; + else if (m == MATCH_YES) + { + gfc_fatal_error ("Unlimited polymorphism at %C not yet supported"); + return MATCH_ERROR; + } + m = gfc_match (" class ( %n )", name); if (m != MATCH_YES) return m;