2010-12-15 Janne Blomqvist <jb@gcc.gnu.org>
+ * trans.c (gfc_allocate_with_status): Better error message for
+ malloc() failure.
+ (gfc_call_realloc): Likewise.
+ * misc.c (gfc_getmem): Likewise.
+
+2010-12-15 Janne Blomqvist <jb@gcc.gnu.org>
+
PR fortran/28105
* trans.c (gfc_call_malloc): Improve comment.
(gfc_allocate_with_status): Remove size < 0 check.
if (stat)
*stat = LIBERROR_ALLOCATION;
else
- runtime_error ("Out of memory");
+ runtime_error ("Allocation would exceed memory limit");
}
return newmem;
} */
1)))));
msg = gfc_build_addr_expr (pchar_type_node, gfc_build_localized_cstring_const
- ("Out of memory"));
+ ("Allocation would exceed memory limit"));
tmp = build_call_expr_loc (input_location,
gfor_fndecl_os_error, 1, msg);
{
res = realloc (mem, size);
if (!res && size != 0)
- _gfortran_os_error ("Out of memory");
+ _gfortran_os_error ("Allocation would exceed memory limit");
if (size == 0)
return NULL;
null_result = fold_build2_loc (input_location, TRUTH_AND_EXPR, boolean_type_node,
null_result, nonzero);
msg = gfc_build_addr_expr (pchar_type_node, gfc_build_localized_cstring_const
- ("Out of memory"));
+ ("Allocation would exceed memory limit"));
tmp = fold_build3_loc (input_location, COND_EXPR, void_type_node,
null_result,
build_call_expr_loc (input_location,