------- Additional Comments From steven at gcc dot gnu dot org 2005-08-02 10:57 ------- We die while looking for an array descriptor for the vector subscript: /* For vector array subscripts we want the size of the vector. */ vecss = ss; while (vecss->data.info.ref->u.ar.dimen_type[dim] == DIMEN_VECTOR) { vecss = vecss->data.info.subscript[dim]; gcc_assert (vecss && vecss->type == GFC_SS_VECTOR); /* Get the descriptors for the vector subscripts as well. */ if (!vecss->data.info.descriptor) gfc_conv_ss_descriptor (&loop->pre, vecss, !loop->array_parameter); dim = vecss->data.info.dim[0]; } But gfc_conv_ss_descriptor starts with: static void gfc_conv_ss_descriptor (stmtblock_t * block, gfc_ss * ss, int base) { gfc_se se; tree tmp; /* Get the descriptor for the array to be scalarized. */ gcc_assert (ss->expr->expr_type == EXPR_VARIABLE); gfc_init_se (&se, NULL); That assert triggers. For my small test case, the expr_type is EXPR_ARRAY and for the maxloc test case it is EXPR_FUNCTION.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21063