diff options
author | Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-08-29 12:44:32 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2007-08-29 12:44:32 +0000 |
commit | 4376b7cf2b7d906c1952205ec3242e689f84f671 (patch) | |
tree | 01404bd7b2cf9f1674f08538ac495ecf3cd28d04 /gcc/fortran/trans.h | |
parent | 31fa49984f6d6b2a6f90296867004265ea395e07 (diff) | |
download | gcc-4376b7cf2b7d906c1952205ec3242e689f84f671.zip gcc-4376b7cf2b7d906c1952205ec3242e689f84f671.tar.gz gcc-4376b7cf2b7d906c1952205ec3242e689f84f671.tar.bz2 |
builtin-types.def (BT_FN_PTR_PTR_SIZE): New type.
* builtin-types.def (BT_FN_PTR_PTR_SIZE): New type.
* builtins.def (BUILT_IN_REALLOC): New builtin.
* trans-array.c (gfc_grow_array): Use gfc_call_realloc.
(gfc_array_allocate): Use gfc_allocate_with_status and
gfc_allocate_array_with_status.
(gfc_array_deallocate): Use gfc_deallocate_with_status.
(gfc_trans_dealloc_allocated): Use gfc_deallocate_with_status.
* trans-stmt.c (gfc_trans_allocate): Use gfc_allocate_with_status.
(gfc_trans_deallocate): Use gfc_deallocate_with_status.
* trans.c (gfc_allocate_with_status, gfc_allocate_array_with_status,
gfc_deallocate_with_status, gfc_call_realloc): New functions.
* trans.h (gfc_allocate_with_status, gfc_allocate_array_with_status,
gfc_deallocate_with_status, gfc_call_realloc): New prototypes.
(gfor_fndecl_internal_realloc, gfor_fndecl_allocate,
gfor_fndecl_allocate_array, gfor_fndecl_deallocate): Remove.
* f95-lang.c (gfc_init_builtin_functions): Create decl for
BUILT_IN_REALLOC.
* trans-decl.c (gfor_fndecl_internal_realloc,
gfor_fndecl_allocate, gfor_fndecl_allocate_array,
gfor_fndecl_deallocate): Remove function decls.
(gfc_build_builtin_function_decls): Likewise.
* runtime/memory.c (internal_realloc, allocate, allocate_array,
deallocate): Remove functions.
* gfortran.map (_gfortran_allocate, _gfortran_allocate_array,
_gfortran_deallocate, _gfortran_internal_realloc): Remove symbols.
* libgfortran.h (error_codes): Add comment.
* gfortran.dg/alloc_comp_basics_1.f90: Update check.
* gfortran.dg/alloc_comp_constructor_1.f90: Update check.
From-SVN: r127897
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r-- | gcc/fortran/trans.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index 48bc9fc..1991748 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -450,6 +450,18 @@ tree gfc_call_free (tree); /* Allocate memory after performing a few checks. */ tree gfc_call_malloc (stmtblock_t *, tree, tree); +/* Allocate memory for arrays, with optional status variable. */ +tree gfc_allocate_array_with_status (stmtblock_t *, tree, tree, tree); + +/* Allocate memory, with optional status variable. */ +tree gfc_allocate_with_status (stmtblock_t *, tree, tree); + +/* Generate code to deallocate an array. */ +tree gfc_deallocate_with_status (tree, tree, bool); + +/* Generate code to call realloc(). */ +tree gfc_call_realloc (stmtblock_t *, tree, tree); + /* Generate code for an assignment, includes scalarization. */ tree gfc_trans_assignment (gfc_expr *, gfc_expr *, bool); @@ -483,10 +495,6 @@ struct gimplify_omp_ctx; void gfc_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *, tree); /* Runtime library function decls. */ -extern GTY(()) tree gfor_fndecl_internal_realloc; -extern GTY(()) tree gfor_fndecl_allocate; -extern GTY(()) tree gfor_fndecl_allocate_array; -extern GTY(()) tree gfor_fndecl_deallocate; extern GTY(()) tree gfor_fndecl_pause_numeric; extern GTY(()) tree gfor_fndecl_pause_string; extern GTY(()) tree gfor_fndecl_stop_numeric; |