Commit dbeebc56 by Mikael Morin

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

	PR fortran/50420
	* simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
	Don't set already set array ref.

From-SVN: r180150
parent db171167
2011-10-18 Mikael Morin <mikael@gcc.gnu.org> 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/50420
* simplify.c (simplify_cobound): Accept non-last-in-ref-chain coarrays.
Don't set already set array ref.
2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
* array.c (gfc_find_array_ref): Remove coarray-specific handling. * array.c (gfc_find_array_ref): Remove coarray-specific handling.
2011-10-18 Mikael Morin <mikael@gcc.gnu.org> 2011-10-18 Mikael Morin <mikael@gcc.gnu.org>
......
...@@ -3512,11 +3512,9 @@ simplify_cobound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper) ...@@ -3512,11 +3512,9 @@ simplify_cobound (gfc_expr *array, gfc_expr *dim, gfc_expr *kind, int upper)
switch (ref->u.ar.type) switch (ref->u.ar.type)
{ {
case AR_ELEMENT: case AR_ELEMENT:
if (ref->next == NULL) if (ref->u.ar.as->corank > 0)
{ {
gcc_assert (ref->u.ar.as->corank > 0 gcc_assert (as == ref->u.ar.as);
&& ref->u.ar.as->rank == 0);
as = ref->u.ar.as;
goto done; goto done;
} }
as = NULL; as = NULL;
......
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