aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2007-07-01 15:08:59 +0300
committerJanne Blomqvist <jb@gcc.gnu.org>2007-07-01 15:08:59 +0300
commita6bd380438744b75e0f86176c6fe337126b6be27 (patch)
tree5bb9fc2057f4bb1d9f02aaf996558df2062ba915 /gcc/fortran/trans-array.c
parentc67e4bcd9f1a4dff58973ea9b3bf3297b0cdc709 (diff)
downloadgcc-a6bd380438744b75e0f86176c6fe337126b6be27.zip
gcc-a6bd380438744b75e0f86176c6fe337126b6be27.tar.gz
gcc-a6bd380438744b75e0f86176c6fe337126b6be27.tar.bz2
fortran frontend:
2007-07-01 Janne Blomqvist <jb@gcc.gnu.org> * trans.h: Remove decls for 64-bit allocation functions. * trans-array.c (gfc_grow_array): Always pick the standard realloc function decl. (gfc_array_allocate): Likewise. * trans-decl.c: Remove trees for 64-bit allocation functions. (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit allocations functions, use index_int_type for normal allocation functions. libgfortran changelog: 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org> * runtime/memory.c (internal_realloc): Use index_type for size argument instead of GFC_INTEGER_4. (allocate_array): Likewise. (allocate): Likewise, add ifdef around unnecessary check. (internal_reallo64): Remove. (allocate_array64): Remove. (allocate64): Remove. * gfortran.map: Remove symbols for 64-bit allocation functions. From-SVN: r126166
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 8b13e67..07862d6 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -842,11 +842,9 @@ gfc_grow_array (stmtblock_t * pblock, tree desc, tree extra)
arg1 = build2 (MULT_EXPR, gfc_array_index_type, tmp,
fold_convert (gfc_array_index_type, size));
- /* Pick the appropriate realloc function. */
- if (gfc_index_integer_kind == 4)
+ /* Pick the realloc function. */
+ if (gfc_index_integer_kind == 4 || gfc_index_integer_kind == 8)
tmp = gfor_fndecl_internal_realloc;
- else if (gfc_index_integer_kind == 8)
- tmp = gfor_fndecl_internal_realloc64;
else
gcc_unreachable ();
@@ -3575,20 +3573,14 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree pstat)
pointer = gfc_conv_descriptor_data_get (se->expr);
STRIP_NOPS (pointer);
- if (TYPE_PRECISION (gfc_array_index_type) == 32)
+ if (TYPE_PRECISION (gfc_array_index_type) == 32 ||
+ TYPE_PRECISION (gfc_array_index_type) == 64)
{
if (allocatable_array)
allocate = gfor_fndecl_allocate_array;
else
allocate = gfor_fndecl_allocate;
}
- else if (TYPE_PRECISION (gfc_array_index_type) == 64)
- {
- if (allocatable_array)
- allocate = gfor_fndecl_allocate64_array;
- else
- allocate = gfor_fndecl_allocate64;
- }
else
gcc_unreachable ();