This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/21063] ICE in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Aug 2005 10:57:10 -0000
- Subject: [Bug fortran/21063] ICE in gfc_conv_ss_descriptor, at fortran/trans-array.c:1224 after using maxloc function
- References: <20050416225125.21063.guillemborrell@yahoo.es>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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