diff options
author | Richard Sandiford <richard@codesourcery.com> | 2005-09-09 06:22:28 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2005-09-09 06:22:28 +0000 |
commit | 62ab4a54994341ab463149da427a51d70d2fbc70 (patch) | |
tree | ca11fbf9511e837a2b37b79ebad342b1aacc05a1 /gcc/fortran/trans-array.h | |
parent | ec25720ba36c2017367b2939cbf1a002694313ab (diff) | |
download | gcc-62ab4a54994341ab463149da427a51d70d2fbc70.zip gcc-62ab4a54994341ab463149da427a51d70d2fbc70.tar.gz gcc-62ab4a54994341ab463149da427a51d70d2fbc70.tar.bz2 |
re PR fortran/21104 (Segmentation fault on correct code)
PR fortran/21104
* trans.h (gfc_interface_sym_mapping, gfc_interface_mapping): Moved
from trans-expr.c.
(gfc_init_interface_mapping, gfc_free_interface_mapping)
(gfc_add_interface_mapping, gfc_finish_interface_mapping)
(gfc_apply_interface_mapping): Declare.
* trans-array.h (gfc_set_loop_bounds_from_array_spec): Declare.
(gfc_trans_allocate_temp_array): Add pre and post block arguments.
* trans-array.c (gfc_set_loop_bounds_from_array_spec): New function.
(gfc_trans_allocate_array_storage): Replace loop argument with
separate pre and post blocks.
(gfc_trans_allocate_temp_array): Add pre and post block arguments.
Update call to gfc_trans_allocate_array_storage.
(gfc_trans_array_constructor, gfc_conv_loop_setup): Adjust for new
interface to gfc_trans_allocate_temp_array.
* trans-expr.c (gfc_interface_sym_mapping, gfc_interface_mapping):
Moved to trans.h.
(gfc_init_interface_mapping, gfc_free_interface_mapping)
(gfc_add_interface_mapping, gfc_finish_interface_mapping)
(gfc_apply_interface_mapping): Make extern.
(gfc_conv_function_call): Build an interface mapping for array
return values too. Call gfc_set_loop_bounds_from_array_spec.
Adjust call to gfc_trans_allocate_temp_array so that code is
added to SE rather than LOOP.
From-SVN: r104075
Diffstat (limited to 'gcc/fortran/trans-array.h')
-rw-r--r-- | gcc/fortran/trans-array.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index eda4245..af990a9 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -26,8 +26,13 @@ tree gfc_array_deallocate (tree, tree); se, which should contain an expression for the array descriptor. */ void gfc_array_allocate (gfc_se *, gfc_ref *, tree); +/* Allow the bounds of a loop to be set from a callee's array spec. */ +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 (gfc_loopinfo *, gfc_ss_info *, tree, bool); +tree gfc_trans_allocate_temp_array (stmtblock_t *, stmtblock_t *, + gfc_loopinfo *, gfc_ss_info *, tree, bool); /* Generate function entry code for allocation of compiler allocated array variables. */ |