+2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/43747
+ * constructor.c: Fix typo in comment.
+ * expr.c (find_array_section): Add check for max array limit.
+
2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
PR bootstrap/31400
if (node)
return (gfc_constructor*) node->value;
- /* Check if the previous node as a repeat count big enough to
+ /* Check if the previous node has a repeat count big enough to
cover the offset looked for. */
node = splay_tree_predecessor (base, offset);
if (!node)
}
}
- cons = gfc_constructor_lookup (base, mpz_get_ui (ptr));
+ limit = mpz_get_ui (ptr);
+ if (limit >= gfc_option.flag_max_array_constructor)
+ {
+ gfc_error ("The number of elements in the array constructor "
+ "at %L requires an increase of the allowed %d "
+ "upper limit. See -fmax-array-constructor "
+ "option", &expr->where,
+ gfc_option.flag_max_array_constructor);
+ return FAILURE;
+ }
+
+ cons = gfc_constructor_lookup (base, limit);
gcc_assert (cons);
gfc_constructor_append_expr (&expr->value.constructor,
gfc_copy_expr (cons->expr), NULL);