http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57285

--- Comment #3 from janus at gcc dot gnu.org ---
Why the hell do we disable the dimension check for CLASS variables?


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;

Reply via email to