This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/57285] [OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy
- From: "janus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 27 Jul 2013 09:07:05 +0000
- Subject: [Bug fortran/57285] [OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy
- Auto-submitted: auto-generated
- References: <bug-57285-4 at http dot gcc dot gnu dot org/bugzilla/>
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;