Currently, gfc_walk_variable_expr changes codimension's type from DIMEN_THIS_IMAGE to DIMEN_RANGE so that it looks like a regular array. We are going to remove that but still want to call gfc_conv_section_startstride on the coarray dimensions to get the cobounds. This patch relaxes an assertion in gfc_conv_section_startstride to accept coarray dimensions.
OK?
2011-09-14 Mikael Morin <mikael.mo...@sfr.fr> * trans-array.c (gfc_conv_section_startstride): Update assertion to also accept coarrays.
diff --git a/trans-array.c b/trans-array.c index 7cc86ba..7f44514 100644 --- a/trans-array.c +++ b/trans-array.c @@ -3204,7 +3204,8 @@ gfc_conv_section_startstride (gfc_loopinfo * loop, gfc_ss * ss, int dim, return; } - gcc_assert (ar->dimen_type[dim] == DIMEN_RANGE); + gcc_assert (ar->dimen_type[dim] == DIMEN_RANGE + || ar->dimen_type[dim] == DIMEN_THIS_IMAGE); desc = info->descriptor; start = ar->start[dim]; end = ar->end[dim];