From 6b1a9af35550da2444e2ea9b38d19d12e6056e77 Mon Sep 17 00:00:00 2001 From: pault Date: Mon, 8 Jun 2009 18:50:37 +0000 Subject: 2009-06-08 Paul Thomas * trans-array.h : Replace prototypes for gfc_conv_descriptor_offset, gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new prototypes of the same names with _get or _set appended. * trans-array.c : Make the originals of the above static and new functions for the _get and _set functions. Update all the references to these descriptor access functions. * trans-expr.c : Update references to the above descriptor access functions. * trans-intrinsic.c : The same. * trans-openmp.c : The same. * trans-stmt.c : The same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@148290 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/fortran/trans-expr.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'gcc/fortran/trans-expr.c') diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index f1f009122ef..29cbff3ed1d 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1628,15 +1628,15 @@ gfc_set_interface_mapping_bounds (stmtblock_t * block, tree type, tree desc) if (GFC_TYPE_ARRAY_LBOUND (type, n) == NULL_TREE) { GFC_TYPE_ARRAY_LBOUND (type, n) - = gfc_conv_descriptor_lbound (desc, dim); + = gfc_conv_descriptor_lbound_get (desc, dim); GFC_TYPE_ARRAY_UBOUND (type, n) - = gfc_conv_descriptor_ubound (desc, dim); + = gfc_conv_descriptor_ubound_get (desc, dim); } else if (GFC_TYPE_ARRAY_UBOUND (type, n) == NULL_TREE) { tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, - gfc_conv_descriptor_ubound (desc, dim), - gfc_conv_descriptor_lbound (desc, dim)); + gfc_conv_descriptor_ubound_get (desc, dim), + gfc_conv_descriptor_lbound_get (desc, dim)); tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, GFC_TYPE_ARRAY_LBOUND (type, n), tmp); @@ -3620,7 +3620,7 @@ gfc_trans_subcomponent_assign (tree dest, gfc_component * cm, gfc_expr * expr) /* Shift the lbound and ubound of temporaries to being unity, rather than zero, based. Calculate the offset for all cases. */ - offset = gfc_conv_descriptor_offset (dest); + offset = gfc_conv_descriptor_offset_get (dest); gfc_add_modify (&block, offset, gfc_index_zero_node); tmp2 =gfc_create_var (gfc_array_index_type, NULL); for (n = 0; n < expr->rank; n++) @@ -3629,24 +3629,24 @@ gfc_trans_subcomponent_assign (tree dest, gfc_component * cm, gfc_expr * expr) && expr->expr_type != EXPR_CONSTANT) { tree span; - tmp = gfc_conv_descriptor_ubound (dest, gfc_rank_cst[n]); + tmp = gfc_conv_descriptor_ubound_get (dest, gfc_rank_cst[n]); span = fold_build2 (MINUS_EXPR, gfc_array_index_type, tmp, - gfc_conv_descriptor_lbound (dest, gfc_rank_cst[n])); - gfc_add_modify (&block, tmp, - fold_build2 (PLUS_EXPR, - gfc_array_index_type, - span, gfc_index_one_node)); - tmp = gfc_conv_descriptor_lbound (dest, gfc_rank_cst[n]); - gfc_add_modify (&block, tmp, gfc_index_one_node); + gfc_conv_descriptor_lbound_get (dest, gfc_rank_cst[n])); + tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, + span, gfc_index_one_node); + gfc_conv_descriptor_ubound_set (&block, dest, gfc_rank_cst[n], + tmp); + gfc_conv_descriptor_lbound_set (&block, dest, gfc_rank_cst[n], + gfc_index_one_node); } tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, - gfc_conv_descriptor_lbound (dest, + gfc_conv_descriptor_lbound_get (dest, gfc_rank_cst[n]), - gfc_conv_descriptor_stride (dest, + gfc_conv_descriptor_stride_get (dest, gfc_rank_cst[n])); gfc_add_modify (&block, tmp2, tmp); tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, offset, tmp2); - gfc_add_modify (&block, offset, tmp); + gfc_conv_descriptor_offset_set (&block, dest, tmp); } if (expr->expr_type == EXPR_FUNCTION -- cgit v1.2.3