This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/57285] [OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy


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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]