]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR fortran/37507 (Print location in (DE)ALLOCATION errors)
authorDaniel Kraft <d@domob.eu>
Thu, 18 Sep 2008 12:02:50 +0000 (14:02 +0200)
committerDaniel Kraft <domob@gcc.gnu.org>
Thu, 18 Sep 2008 12:02:50 +0000 (14:02 +0200)
commitf25a62a5f34a0f33b00238c6c681edac038e1078
treee5471c68dc29810955e55c653efe13687946b17a
parente7089ecf1c8a67d5572ada8ecd3b3d99f420089c
re PR fortran/37507 (Print location in (DE)ALLOCATION errors)

2008-09-18  Daniel Kraft  <d@domob.eu>

PR fortran/37507
* trans.h (gfc_trans_runtime_error): New method.
(gfc_trans_runtime_error_vararg): New method.
(gfc_allocate_array_with_status): New argument `expr' for locus/varname.
(gfc_deallocate_array_with_status): Ditto.
* trans-array.h (gfc_array_deallocate): Ditto.
* trans.c (gfc_trans_runtime_error): New method.
(gfc_trans_runtime_error_vararg): New method, moved parts of the code
from gfc_trans_runtime_check here.
(gfc_trans_runtime_error_check): Moved code partly to new method.
(gfc_call_malloc): Fix tab-indentation.
(gfc_allocate_array_with_status): New argument `expr' and call
gfc_trans_runtime_error for error reporting to include locus.
(gfc_deallocate_with_status): Ditto.
* trans-stmt.c (gfc_trans_deallocate): Pass expr as new argument.
* trans-array.c (gfc_array_allocate): Ditto.
(gfc_array_deallocate): New argument `expr', passed on.
(gfc_trans_dealloc_allocated): Pass NULL for expr.
* trans-openmp.c (gfc_omp_clause_default): Ditto.

2008-09-18  Daniel Kraft  <d@domob.eu>

PR fortran/37507
* gfortran.dg/allocate_error_1.f90: New test.
* gfortran.dg/deallocate_error_1.f90: New test.
* gfortran.dg/deallocate_error_2.f90: New test.

From-SVN: r140451
gcc/fortran/ChangeLog
gcc/fortran/trans-array.c
gcc/fortran/trans-array.h
gcc/fortran/trans-openmp.c
gcc/fortran/trans-stmt.c
gcc/fortran/trans.c
gcc/fortran/trans.h
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/allocate_error_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/deallocate_error_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/deallocate_error_2.f90 [new file with mode: 0644]