-
- Downloads
Fortran: improve runtime error message with ALLOCATE and ERRMSG= [PR91300]
ALLOCATE: generate different STAT,ERRMSG results for failures from allocation of already allocated objects or insufficient virtual memory. gcc/fortran/ChangeLog: PR fortran/91300 * libgfortran.h: Define new error code LIBERROR_NO_MEMORY. * trans-stmt.cc (gfc_trans_allocate): Generate code for setting ERRMSG depending on result of STAT result of ALLOCATE. * trans.cc (gfc_allocate_using_malloc): Use STAT value of LIBERROR_NO_MEMORY in case of failed malloc. gcc/testsuite/ChangeLog: PR fortran/91300 * gfortran.dg/allocate_alloc_opt_15.f90: New test.
Showing
- gcc/fortran/libgfortran.h 1 addition, 0 deletionsgcc/fortran/libgfortran.h
- gcc/fortran/trans-stmt.cc 30 additions, 3 deletionsgcc/fortran/trans-stmt.cc
- gcc/fortran/trans.cc 2 additions, 2 deletionsgcc/fortran/trans.cc
- gcc/testsuite/gfortran.dg/allocate_alloc_opt_15.f90 49 additions, 0 deletionsgcc/testsuite/gfortran.dg/allocate_alloc_opt_15.f90
Loading
Please register or sign in to comment