diff options
author | Erik Edelmann <eedelman@gcc.gnu.org> | 2006-03-10 23:28:38 +0000 |
---|---|---|
committer | Erik Edelmann <eedelman@gcc.gnu.org> | 2006-03-10 23:28:38 +0000 |
commit | 8e119f1b63d9de421ffdda86e8a710ba30b58d34 (patch) | |
tree | df22f386bb6af80823879f5088a1bd3c99fb5e8f /gcc/fortran/trans-array.h | |
parent | ea725d4524db8fa1bc593f5aa0e297a01ab721f3 (diff) | |
download | gcc-8e119f1b63d9de421ffdda86e8a710ba30b58d34.zip gcc-8e119f1b63d9de421ffdda86e8a710ba30b58d34.tar.gz gcc-8e119f1b63d9de421ffdda86e8a710ba30b58d34.tar.bz2 |
symbol.c (check_conflict): Allow allocatable function results, except for elemental functions.
fortran/
2006-03-11 Erik Edelmann <eedelman@gcc.gnu.org>
* symbol.c (check_conflict): Allow allocatable function results,
except for elemental functions.
* trans-array.c (gfc_trans_allocate_temp_array): Rename to ...
(gfc_trans_create_temp_array): ... this, and add new argument callee_alloc.
(gfc_trans_array_constructor, gfc_conv_loop_setup): Update call
to gfc_trans_allocate_temp_array.
* trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
* trans-expr.c (gfc_conv_function_call): Use new arg of
gfc_trans_create_temp_array avoid pre-allocation of temporary
result variables of pointer AND allocatable functions.
(gfc_trans_arrayfunc_assign): Return NULL for allocatable functions.
* resolve.c (resolve_symbol): Copy value of 'allocatable' attribute
from sym->result to sym.
testsuite/
2006-03-08 Paul Thomas <pault@gcc.gnu.org>
Erik Edelmann <eedelman@gcc.gnu.org>
* gfortran.dg/allocatable_function_1.f90: New.
* gfortran.dg/allocatable_function_2.f90: New.
From-SVN: r111951
Diffstat (limited to 'gcc/fortran/trans-array.h')
-rw-r--r-- | gcc/fortran/trans-array.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index fed1bf0..bc7cab5 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -30,10 +30,9 @@ bool gfc_array_allocate (gfc_se *, gfc_expr *, tree); void gfc_set_loop_bounds_from_array_spec (gfc_interface_mapping *, gfc_se *, gfc_array_spec *); -/* Generate code to allocate a temporary array. */ -tree gfc_trans_allocate_temp_array (stmtblock_t *, stmtblock_t *, - gfc_loopinfo *, gfc_ss_info *, tree, bool, - bool); +/* Generate code to create a temporary array. */ +tree gfc_trans_create_temp_array (stmtblock_t *, stmtblock_t *, gfc_loopinfo *, + gfc_ss_info *, tree, bool, bool, bool); /* Generate function entry code for allocation of compiler allocated array variables. */ |