2009-06-22 Tobias Burnus <burnus@net-b.de>
PR fortran/40472
PR fortran/50520
* simplify.c (gfc_simplify_spread): Fix the case that source=
is a scalar.
From-SVN: r148814
+2009-06-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/40472
+ PR fortran/50520
+ * simplify.c (gfc_simplify_spread): Fix the case that source=
+ is a scalar.
+
2009-06-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40443
/* 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_init_set_ui (size, 1);
+
if (mpz_get_si (size)*ncopies > gfc_option.flag_max_array_constructor)
return NULL;