diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2010-12-15 19:42:09 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2010-12-15 19:42:09 +0200 |
commit | bd085c2093d2edb2224e7129d516860c0c26954d (patch) | |
tree | 4f5047c103d4dd28317eeded277ca0bf8e236bd0 /gcc/fortran/trans.c | |
parent | 272dc8514341566a82eeba15fc1ebc78bb058358 (diff) | |
download | gcc-bd085c2093d2edb2224e7129d516860c0c26954d.zip gcc-bd085c2093d2edb2224e7129d516860c0c26954d.tar.gz gcc-bd085c2093d2edb2224e7129d516860c0c26954d.tar.bz2 |
Better error message for malloc() failure
From-SVN: r167863
Diffstat (limited to 'gcc/fortran/trans.c')
-rw-r--r-- | gcc/fortran/trans.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c index f3914a1..1fd0dc1 100644 --- a/gcc/fortran/trans.c +++ b/gcc/fortran/trans.c @@ -590,7 +590,7 @@ gfc_call_malloc (stmtblock_t * block, tree type, tree size) if (stat) *stat = LIBERROR_ALLOCATION; else - runtime_error ("Out of memory"); + runtime_error ("Allocation would exceed memory limit"); } return newmem; } */ @@ -636,7 +636,7 @@ gfc_allocate_with_status (stmtblock_t * block, tree size, tree status) 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); @@ -1003,7 +1003,7 @@ internal_realloc (void *mem, size_t size) { 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; @@ -1036,7 +1036,7 @@ gfc_call_realloc (stmtblock_t * block, tree mem, tree size) 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, |