Commit 6b81e94d by Mikael Morin

re PR fortran/50420 ([Coarray] lcobound doesn't accept coarray subcomponents)

	PR fortran/50420
	* trans-array.c (gfc_walk_array_ref): Allow zero rank arrays
	if they are coarrays.

From-SVN: r180145
parent 42ac5ee1
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.
......
......@@ -7700,8 +7700,10 @@ gfc_walk_array_ref (gfc_ss * ss, gfc_expr * expr, gfc_ref * ref)
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment