------- Comment #12 from burnus at gcc dot gnu dot org 2009-06-22 14:21 ------- Patch
Index: simplify.c =================================================================== --- simplify.c (revision 148777) +++ simplify.c (working copy) @@ -5117,7 +5117,14 @@ gfc_simplify_spread (gfc_expr *source, g /* Do not allow the array size to exceed the limit for an array constructor. */ - gfc_array_size (source, &size); + if (source->expr_type == EXPR_ARRAY) + { + if (gfc_array_size (source, &size) == FAILURE) + gfc_internal_error ("Failure getting length of a constant array."); + } + else + mpz_set_si (size, 1); + if (mpz_get_si (size)*ncopies > gfc_option.flag_max_array_constructor) return NULL; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40472