http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57285
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |janus at gcc dot gnu.org --- Comment #4 from janus at gcc dot gnu.org --- (In reply to janus from comment #3) > Why the hell do we disable the dimension check for CLASS variables? Seems to be some sort of artifact from the early class-array implementation: http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=182210 > Index: gcc/fortran/check.c > =================================================================== > --- gcc/fortran/check.c (revision 201253) > +++ gcc/fortran/check.c (working copy) > @@ -608,9 +608,6 @@ dim_rank_check (gfc_expr *dim, gfc_expr *array, in > if (dim->expr_type != EXPR_CONSTANT) > return true; > > - if (array->ts.type == BT_CLASS) > - return true; > - > if (array->expr_type == EXPR_FUNCTION && array->value.function.isym > && array->value.function.isym->id == GFC_ISYM_SPREAD) > rank = array->rank + 1; In any case, this patch regtests cleanly. Will commit as obvious ...