aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.h
diff options
context:
space:
mode:
authorDaniel Carrera <dcarrera@gmail.com>2011-07-21 23:18:24 +0000
committerDaniel Carrera <dcarrera@gcc.gnu.org>2011-07-21 23:18:24 +0000
commit8f992d640ed577dd5a8427d8c7855d7a51287e7f (patch)
treefeafa74c7b83c19f1ce8231bff3d26718744b8c8 /gcc/fortran/trans.h
parentef74e2ba382eecfea8d7ef44d54add99c3fd4d92 (diff)
downloadgcc-8f992d640ed577dd5a8427d8c7855d7a51287e7f.zip
gcc-8f992d640ed577dd5a8427d8c7855d7a51287e7f.tar.gz
gcc-8f992d640ed577dd5a8427d8c7855d7a51287e7f.tar.bz2
trans.c (gfc_allocate_with_status): Split into two functions gfc_allocate_using_malloc and gfc_allocate_usig_lib.
2011-07-21 Daniel Carrera <dcarrera@gmail.com> * trans.c (gfc_allocate_with_status): Split into two functions gfc_allocate_using_malloc and gfc_allocate_usig_lib. (gfc_allocate_using_malloc): The status parameter is now the actual status rather than a pointer. Code cleanup. (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and errlen. Pass these to the coarray lib. * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to gfc_allocate_allocatable. (gfc_omp_clause_copy_ctor): Ditto. (gfc_trans_omp_array_reduction): Ditto. * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate fuctions. If using coarray lib, pass errmsg and errlen to the allocate functions. Move error checking outside the if (!gfc_array_allocate) block so that it also affects trees produced by gfc_array_allocate. * trans-array.c (gfc_array_allocate): Add new parameters errmsg and errlen. Replace parameter pstat by status. Code cleanup. Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc. * trans-array.h (gfc_array_allocate): Update signature of gfc_array_allocate. From-SVN: r176606
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r--gcc/fortran/trans.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index 48e054f..73e2fa0 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -541,11 +541,12 @@ tree gfc_call_malloc (stmtblock_t *, tree, tree);
tree gfc_build_memcpy_call (tree, tree, tree);
/* Allocate memory for allocatable variables, with optional status variable. */
-tree gfc_allocate_allocatable_with_status (stmtblock_t*,
- tree, tree, tree, gfc_expr*);
+tree gfc_allocate_allocatable (stmtblock_t*, tree, tree,
+ tree, tree, tree, gfc_expr*);
/* Allocate memory, with optional status variable. */
-tree gfc_allocate_with_status (stmtblock_t *, tree, tree, bool);
+tree gfc_allocate_using_malloc (stmtblock_t *, tree, tree);
+tree gfc_allocate_using_lib (stmtblock_t *, tree, tree, tree, tree);
/* Generate code to deallocate an array. */
tree gfc_deallocate_with_status (tree, tree, bool, gfc_expr*);