resolve.c (resolve_array_ref): Set array_ref's dimen field (and the associated dimen_type) in the full array...

* resolve.c (resolve_array_ref): Set array_ref's dimen field (and the
	associated dimen_type) in the full array ref case.

From-SVN: r179685
This commit is contained in:
Mikael Morin 2011-10-07 21:56:11 +02:00 committed by Mikael Morin
parent 9b701a45c0
commit 5551a54eda
2 changed files with 22 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
* resolve.c (resolve_array_ref): Set array_ref's dimen field (and the
associated dimen_type) in the full array ref case.
2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
* trans-intrinsic.c (walk_coarray): New function.

View File

@ -4644,8 +4644,23 @@ resolve_array_ref (gfc_array_ref *ar)
}
}
if (ar->type == AR_FULL && ar->as->rank == 0)
ar->type = AR_ELEMENT;
if (ar->type == AR_FULL)
{
if (ar->as->rank == 0)
ar->type = AR_ELEMENT;
/* Make sure array is the same as array(:,:), this way
we don't need to special case all the time. */
ar->dimen = ar->as->rank;
for (i = 0; i < ar->dimen; i++)
{
ar->dimen_type[i] = DIMEN_RANGE;
gcc_assert (ar->start[i] == NULL);
gcc_assert (ar->end[i] == NULL);
gcc_assert (ar->stride[i] == NULL);
}
}
/* If the reference type is unknown, figure out what kind it is. */