diff options
author | Daniel Carrera <dcarrera@gmail.com> | 2011-07-06 20:57:03 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2011-07-06 22:57:03 +0200 |
commit | ea6363a3b170a4783b2784f194c18ebfa29d1413 (patch) | |
tree | 036a81e27cd7b393a3be5549a7d7d3aadc196098 /gcc/fortran/trans-array.c | |
parent | b7758f22752f93222b4d9ba9260b56af66ab7ea7 (diff) | |
download | gcc-ea6363a3b170a4783b2784f194c18ebfa29d1413.zip gcc-ea6363a3b170a4783b2784f194c18ebfa29d1413.tar.gz gcc-ea6363a3b170a4783b2784f194c18ebfa29d1413.tar.bz2 |
trans-array.c (gfc_array_allocate): Rename allocatable_array
2011-07-06 Daniel Carrera <dcarrera@gmail.com>
* trans-array.c (gfc_array_allocate): Rename allocatable_array
* to
allocatable. Rename function gfc_allocate_array_with_status to
gfc_allocate_allocatable_with_status. Update function call for
gfc_allocate_with_status.
* trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
* trans-stmt.c (gfc_trans_allocate): Update function call for
gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
to gfc_allocate_allocatable_with_status.
* trans.c (gfc_call_malloc): Add new parameter
* gfc_allocate_with_status
so it uses the library for memory allocation when -fcoarray=lib.
(gfc_allocate_allocatable_with_status): Renamed from
gfc_allocate_array_with_status.
(gfc_allocate_allocatable_with_status): Update function call for
gfc_allocate_with_status.
* trans.h (gfc_coarray_type): New enum.
(gfc_allocate_with_status): Update prototype.
(gfc_allocate_allocatable_with_status): Renamed from
gfc_allocate_array_with_status.
* trans-decl.c (generate_coarray_sym_init): Use the new constant
GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
From-SVN: r175937
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 4c21389..f4f79f9 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4381,7 +4381,7 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree pstat) gfc_expr **lower; gfc_expr **upper; gfc_ref *ref, *prev_ref = NULL; - bool allocatable_array, coarray; + bool allocatable, coarray; ref = expr->ref; @@ -4399,12 +4399,12 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree pstat) if (!prev_ref) { - allocatable_array = expr->symtree->n.sym->attr.allocatable; + allocatable = expr->symtree->n.sym->attr.allocatable; coarray = expr->symtree->n.sym->attr.codimension; } else { - allocatable_array = prev_ref->u.c.component->attr.allocatable; + allocatable = prev_ref->u.c.component->attr.allocatable; coarray = prev_ref->u.c.component->attr.codimension; } @@ -4485,10 +4485,11 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree pstat) STRIP_NOPS (pointer); /* The allocate_array variants take the old pointer as first argument. */ - if (allocatable_array) - tmp = gfc_allocate_array_with_status (&elseblock, pointer, size, pstat, expr); + if (allocatable) + tmp = gfc_allocate_allocatable_with_status (&elseblock, + pointer, size, pstat, expr); else - tmp = gfc_allocate_with_status (&elseblock, size, pstat); + tmp = gfc_allocate_with_status (&elseblock, size, pstat, false); tmp = fold_build2_loc (input_location, MODIFY_EXPR, void_type_node, pointer, tmp); |