* trans-array.c (gfc_walk_array_ref): Allow zero rank arrays
if they are coarrays.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180145
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
+ PR fortran/50420
+ * trans-array.c (gfc_walk_array_ref): Allow zero rank arrays
+ if they are coarrays.
+
+2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
+
* trans-array.h (gfc_walk_array_ref): New prototype.
* trans-array.c (gfc_walk_array_ref): New function, containing
all but the beginning of gfc_walk_variable_expr's code.
gcc_unreachable ();
}
}
- /* We should have at least one non-elemental dimension. */
- gcc_assert (newss->data.info.dimen > 0);
+ /* We should have at least one non-elemental dimension,
+ unless we are creating a descriptor for a (scalar) coarray. */
+ gcc_assert (newss->data.info.dimen > 0
+ || newss->data.info.ref->u.ar.as->corank > 0);
ss = newss;
break;