aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.c
diff options
context:
space:
mode:
authorSteven G. Kargl <kargls@comcast.net>2005-06-11 22:29:17 +0000
committerSteven G. Kargl <kargl@gcc.gnu.org>2005-06-11 22:29:17 +0000
commit364667a1ca156f8b6b5fb682cbd423108d6f223c (patch)
tree3b719a5f0073b8b53e945c7881da1bea47e61c45 /gcc/fortran/trans-array.c
parentc6bdf92e07201b58176521b96de36150aa092ea6 (diff)
downloadgcc-364667a1ca156f8b6b5fb682cbd423108d6f223c.zip
gcc-364667a1ca156f8b6b5fb682cbd423108d6f223c.tar.gz
gcc-364667a1ca156f8b6b5fb682cbd423108d6f223c.tar.bz2
re PR fortran/17792 ([4.0 only] deallocate does not return stat)
PR fortran/17792 PR fortran/21375 * trans-array.c (gfc_array_deallocate): pstat is new argument (gfc_array_allocate): update gfc_array_deallocate() call. (gfc_trans_deferred_array): ditto. * trans-array.h: update gfc_array_deallocate() prototype. * trans-decl.c (gfc_build_builtin_function_decls): update declaration * trans-stmt.c (gfc_trans_deallocate): Implement STAT= feature. From-SVN: r100845
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 3554107..ea5ec52 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -2778,7 +2778,7 @@ gfc_array_allocate (gfc_se * se, gfc_ref * ref, tree pstat)
/*GCC ARRAYS*/
tree
-gfc_array_deallocate (tree descriptor)
+gfc_array_deallocate (tree descriptor, tree pstat)
{
tree var;
tree tmp;
@@ -2793,7 +2793,7 @@ gfc_array_deallocate (tree descriptor)
/* Parameter is the address of the data component. */
tmp = gfc_chainon_list (NULL_TREE, var);
- tmp = gfc_chainon_list (tmp, integer_zero_node);
+ tmp = gfc_chainon_list (tmp, pstat);
tmp = gfc_build_function_call (gfor_fndecl_deallocate, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -4026,7 +4026,7 @@ gfc_trans_deferred_array (gfc_symbol * sym, tree body)
gfc_start_block (&block);
/* Deallocate if still allocated at the end of the procedure. */
- deallocate = gfc_array_deallocate (descriptor);
+ deallocate = gfc_array_deallocate (descriptor, null_pointer_node);
tmp = gfc_conv_descriptor_data (descriptor);
tmp = build2 (NE_EXPR, boolean_type_node, tmp,