------- Comment #4 from jvdelisle at gcc dot gnu dot org 2007-05-04 02:47 ------- The ice is happening here:
/* Create an array constructor from an initialization expression. We assume the frontend already did any expansions and conversions. */ tree gfc_conv_array_initializer (tree type, gfc_expr * expr) { gfc_constructor *c; tree tmp; mpz_t maxval; gfc_se se; HOST_WIDE_INT hi; unsigned HOST_WIDE_INT lo; tree index, range; VEC(constructor_elt,gc) *v = NULL; gfc_show_expr (expr); switch (expr->expr_type) { case EXPR_CONSTANT: case EXPR_STRUCTURE: The comment indicates that the initialization expression should already be expanded. For the test case given, expr->expr_type is FUNCTION for which there is no case. The function needs to be evaluated before getting here. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31218