diff mbox

[fortran,09/21] Remove coarray support in the scalarizer: Accept coarray dimensions in gfc_conv_section_startstride

Message ID 20110915230834.28513.55958@gimli.local
State New
Headers show

Commit Message

Mikael Morin Sept. 15, 2011, 11:08 p.m. UTC
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.morin@sfr.fr>

	* trans-array.c (gfc_conv_section_startstride): Update assertion to
	also accept coarrays.
diff mbox

Patch

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];