diff options
author | Richard Biener <rguenth@gcc.gnu.org> | 2008-07-28 14:33:56 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-07-28 14:33:56 +0000 |
commit | 726a989a8b74bf238a96029860bcf7ba14eff317 (patch) | |
tree | 2926705dd533a8904679724ab1cec40dfee45094 /gcc/fortran/trans-array.c | |
parent | 0d48657d7378a4b1cb25ed181bca8020eae520f1 (diff) | |
download | gcc-726a989a8b74bf238a96029860bcf7ba14eff317.zip gcc-726a989a8b74bf238a96029860bcf7ba14eff317.tar.gz gcc-726a989a8b74bf238a96029860bcf7ba14eff317.tar.bz2 |
backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
2008-07-28 Richard Guenther <rguenther@suse.de>
Merge from gimple-tuples-branch.
* ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
* gimple.def: New file.
* gsstruct.def: Likewise.
* gimple-iterator.c: Likewise.
* gimple-pretty-print.c: Likewise.
* tree-gimple.c: Removed. Merged into ...
* gimple.c: ... here. New file.
* tree-gimple.h: Removed. Merged into ...
* gimple.h: ... here. New file.
* Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
* configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
--enable-checking=gimple flag.
* config.in: Likewise.
* configure: Regenerated.
* tree-ssa-operands.h: Tuplified.
* tree-vrp.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-dump.c: Likewise.
* tree-complex.c: Likewise.
* cgraphbuild.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-pretty-print.c: Likewise.
* tracer.c: Likewise.
* gengtype.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-ssa-loop-unswitch.c: Likewise.
* cgraph.c: Likewise.
* cgraph.h: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* value-prof.c: Likewise.
* tree-ssa-loop-ch.c: Likewise.
* tree-tailcall.c: Likewise.
* value-prof.h: Likewise.
* tree.c: Likewise.
* tree.h: Likewise.
* tree-pass.h: Likewise.
* ipa-cp.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-scalar-evolution.h: Likewise.
* target.h: Likewise.
* lambda-mat.c: Likewise.
* tree-phinodes.c: Likewise.
* diagnostic.h: Likewise.
* builtins.c: Likewise.
* tree-ssa-alias-warnings.c: Likewise.
* cfghooks.c: Likewise.
* fold-const.c: Likewise.
* cfghooks.h: Likewise.
* omp-low.c: Likewise.
* tree-ssa-dse.c: Likewise.
* ipa-reference.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* toplev.c: Likewise.
* tree-gimple.c: Likewise.
* tree-gimple.h: Likewise.
* tree-chrec.c: Likewise.
* tree-chrec.h: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-sccvn.h: Likewise.
* cgraphunit.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-nomudflap.c: Likewise.
* tree-call-cdce.c: Likewise.
* ipa-pure-const.c: Likewise.
* c-format.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-ssa-math-opts.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-nrv.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* ipa-utils.c: Likewise.
* tree-ssa-propagate.h: Likewise.
* tree-ssa-alias.c: Likewise.
* gimple-low.c: Likewise.
* tree-ssa-sink.c: Likewise.
* ipa-inline.c: Likewise.
* c-semantics.c: Likewise.
* dwarf2out.c: Likewise.
* expr.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* predict.c: Likewise.
* tree-ssa-loop.c: Likewise.
* tree-parloops.c: Likewise.
* tree-ssa-address.c: Likewise.
* tree-ssa-ifcombine.c: Likewise.
* matrix-reorg.c: Likewise.
* c-decl.c: Likewise.
* tree-eh.c: Likewise.
* c-pretty-print.c: Likewise.
* lambda-trans.c: Likewise.
* function.c: Likewise.
* langhooks.c: Likewise.
* ebitmap.h: Likewise.
* tree-vectorizer.c: Likewise.
* function.h: Likewise.
* langhooks.h: Likewise.
* tree-vectorizer.h: Likewise.
* ipa-type-escape.c: Likewise.
* ipa-type-escape.h: Likewise.
* domwalk.c: Likewise.
* tree-if-conv.c: Likewise.
* profile.c: Likewise.
* domwalk.h: Likewise.
* tree-data-ref.c: Likewise.
* tree-data-ref.h: Likewise.
* tree-flow-inline.h: Likewise.
* tree-affine.c: Likewise.
* tree-vect-analyze.c: Likewise.
* c-typeck.c: Likewise.
* gimplify.c: Likewise.
* coretypes.h: Likewise.
* tree-ssa-phiopt.c: Likewise.
* calls.c: Likewise.
* tree-ssa-coalesce.c: Likewise.
* tree.def: Likewise.
* tree-dfa.c: Likewise.
* except.c: Likewise.
* except.h: Likewise.
* cfgexpand.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-sra.c: Likewise.
* tree-ssa-live.h: Likewise.
* tree-predcom.c: Likewise.
* lambda.h: Likewise.
* tree-mudflap.c: Likewise.
* ipa-prop.c: Likewise.
* print-tree.c: Likewise.
* tree-ssa-copy.c: Likewise.
* ipa-prop.h: Likewise.
* tree-ssa-forwprop.c: Likewise.
* ggc-page.c: Likewise.
* c-omp.c: Likewise.
* tree-ssa-dce.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-ssa-ter.c: Likewise.
* tree-nested.c: Likewise.
* tree-ssa.c: Likewise.
* lambda-code.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-inline.c: Likewise.
* tree-inline.h: Likewise.
* tree-iterator.c: Likewise.
* tree-optimize.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-vect-transform.c: Likewise.
* tree-object-size.c: Likewise.
* tree-outof-ssa.c: Likewise.
* cfgloop.c: Likewise.
* system.h: Likewise.
* tree-profile.c: Likewise.
* cfgloop.h: Likewise.
* c-gimplify.c: Likewise.
* c-common.c: Likewise.
* tree-vect-generic.c: Likewise.
* tree-flow.h: Likewise.
* c-common.h: Likewise.
* basic-block.h: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-switch-conversion.c: Likewise.
* tree-ssa-structalias.h: Likewise.
* tree-cfg.c: Likewise.
* passes.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa-struct-reorg.h: Likewise.
* tree-ssa-reassoc.c: Likewise.
* cfgrtl.c: Likewise.
* varpool.c: Likewise.
* stmt.c: Likewise.
* tree-ssanames.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* langhooks-def.h: Likewise.
* tree-ssa-operands.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/frv/frv.c: Likewise.
* config/s390/s390.c: Likewise.
* config/m32c/m32c.c: Likewise.
* config/m32c/m32c-protos.h: Likewise.
* config/spu/spu.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/i386/i386.c: Likewise.
* config/sh/sh.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/pa/pa.c: Likewise.
* config/mips/mips.c: Likewise.
From-SVN: r138207
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 122 |
1 files changed, 60 insertions, 62 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index 14bab8e..fe6b63d 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -80,7 +80,7 @@ along with GCC; see the file COPYING3. If not see #include "system.h" #include "coretypes.h" #include "tree.h" -#include "tree-gimple.h" +#include "gimple.h" #include "ggc.h" #include "toplev.h" #include "real.h" @@ -161,12 +161,10 @@ gfc_conv_descriptor_data_get (tree desc) This function gets called through the following macros: gfc_conv_descriptor_data_set - gfc_conv_descriptor_data_set_tuples. */ + gfc_conv_descriptor_data_set. */ void -gfc_conv_descriptor_data_set_internal (stmtblock_t *block, - tree desc, tree value, - bool tuples_p) +gfc_conv_descriptor_data_set (stmtblock_t *block, tree desc, tree value) { tree field, type, t; @@ -177,7 +175,7 @@ gfc_conv_descriptor_data_set_internal (stmtblock_t *block, gcc_assert (DATA_FIELD == 0); t = fold_build3 (COMPONENT_REF, TREE_TYPE (field), desc, field, NULL_TREE); - gfc_add_modify (block, t, fold_convert (TREE_TYPE (field), value), tuples_p); + gfc_add_modify (block, t, fold_convert (TREE_TYPE (field), value)); } @@ -547,7 +545,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre, stmtblock_t * post, /* The offset is zero because we create temporaries with a zero lower bound. */ tmp = gfc_conv_descriptor_offset (desc); - gfc_add_modify_expr (pre, tmp, gfc_index_zero_node); + gfc_add_modify (pre, tmp, gfc_index_zero_node); if (dealloc && !onstack) { @@ -627,7 +625,7 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post, /* Fill in the array dtype. */ tmp = gfc_conv_descriptor_dtype (desc); - gfc_add_modify_expr (pre, tmp, gfc_get_dtype (TREE_TYPE (desc))); + gfc_add_modify (pre, tmp, gfc_get_dtype (TREE_TYPE (desc))); /* Fill in the bounds and stride. This is a packed array, so: @@ -661,13 +659,13 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post, /* Store the stride and bound components in the descriptor. */ tmp = gfc_conv_descriptor_stride (desc, gfc_rank_cst[n]); - gfc_add_modify_expr (pre, tmp, size); + gfc_add_modify (pre, tmp, size); tmp = gfc_conv_descriptor_lbound (desc, gfc_rank_cst[n]); - gfc_add_modify_expr (pre, tmp, gfc_index_zero_node); + gfc_add_modify (pre, tmp, gfc_index_zero_node); tmp = gfc_conv_descriptor_ubound (desc, gfc_rank_cst[n]); - gfc_add_modify_expr (pre, tmp, loop->to[n]); + gfc_add_modify (pre, tmp, loop->to[n]); tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, loop->to[n], gfc_index_one_node); @@ -752,7 +750,7 @@ gfc_conv_array_transpose (gfc_se * se, gfc_expr * expr) se->expr = dest; /* Copy across the dtype field. */ - gfc_add_modify_expr (&se->pre, + gfc_add_modify (&se->pre, gfc_conv_descriptor_dtype (dest), gfc_conv_descriptor_dtype (src)); @@ -769,15 +767,15 @@ gfc_conv_array_transpose (gfc_se * se, gfc_expr * expr) dest_index = gfc_rank_cst[n]; src_index = gfc_rank_cst[1 - n]; - gfc_add_modify_expr (&se->pre, + gfc_add_modify (&se->pre, gfc_conv_descriptor_stride (dest, dest_index), gfc_conv_descriptor_stride (src, src_index)); - gfc_add_modify_expr (&se->pre, + gfc_add_modify (&se->pre, gfc_conv_descriptor_lbound (dest, dest_index), gfc_conv_descriptor_lbound (src, src_index)); - gfc_add_modify_expr (&se->pre, + gfc_add_modify (&se->pre, gfc_conv_descriptor_ubound (dest, dest_index), gfc_conv_descriptor_ubound (src, src_index)); @@ -803,7 +801,7 @@ gfc_conv_array_transpose (gfc_se * se, gfc_expr * expr) else dest_info->offset = gfc_index_zero_node; - gfc_add_modify_expr (&se->pre, + gfc_add_modify (&se->pre, gfc_conv_descriptor_offset (dest), dest_info->offset); @@ -847,7 +845,7 @@ gfc_grow_array (stmtblock_t * pblock, tree desc, tree extra) /* Add EXTRA to the upper bound. */ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, ubound, extra); - gfc_add_modify_expr (pblock, ubound, tmp); + gfc_add_modify (pblock, ubound, tmp); /* Get the value of the current data pointer. */ arg0 = gfc_conv_descriptor_data_get (desc); @@ -957,7 +955,7 @@ gfc_put_offset_into_var (stmtblock_t * pblock, tree * poffset, /* We should have already created the offset variable. We cannot create it here because we may be in an inner scope. */ gcc_assert (*offsetvar != NULL_TREE); - gfc_add_modify_expr (pblock, *offsetvar, *poffset); + gfc_add_modify (pblock, *offsetvar, *poffset); *poffset = *offsetvar; TREE_USED (*offsetvar) = 1; } @@ -996,7 +994,7 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock, tree desc, { /* The temporary is an array of pointers. */ se->expr = fold_convert (TREE_TYPE (tmp), se->expr); - gfc_add_modify_expr (&se->pre, tmp, se->expr); + gfc_add_modify (&se->pre, tmp, se->expr); } else { @@ -1011,7 +1009,7 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock, tree desc, { if (first_len) { - gfc_add_modify_expr (&se->pre, first_len_val, + gfc_add_modify (&se->pre, first_len_val, se->string_length); first_len = false; } @@ -1033,7 +1031,7 @@ gfc_trans_array_ctor_element (stmtblock_t * pblock, tree desc, { /* TODO: Should the frontend already have done this conversion? */ se->expr = fold_convert (TREE_TYPE (tmp), se->expr); - gfc_add_modify_expr (&se->pre, tmp, se->expr); + gfc_add_modify (&se->pre, tmp, se->expr); } gfc_add_block_to_block (pblock, &se->pre); @@ -1104,7 +1102,7 @@ gfc_trans_array_constructor_subarray (stmtblock_t * pblock, /* Increment the offset. */ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, *poffset, gfc_index_one_node); - gfc_add_modify_expr (&body, *poffset, tmp); + gfc_add_modify (&body, *poffset, tmp); /* Finish the loop. */ gfc_trans_scalarizing_loops (&loop, &body); @@ -1243,7 +1241,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type, } if (!INTEGER_CST_P (*poffset)) { - gfc_add_modify_expr (&body, *offsetvar, *poffset); + gfc_add_modify (&body, *offsetvar, *poffset); *poffset = *offsetvar; } } @@ -1289,13 +1287,13 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type, /* Make a temporary, store the current value in that and return it, once the loop is done. */ tmp_loopvar = gfc_create_var (TREE_TYPE (loopvar), "loopvar"); - gfc_add_modify_expr (pblock, tmp_loopvar, loopvar); + gfc_add_modify (pblock, tmp_loopvar, loopvar); /* Initialize the loop. */ gfc_init_se (&se, NULL); gfc_conv_expr_val (&se, c->iterator->start); gfc_add_block_to_block (pblock, &se.pre); - gfc_add_modify_expr (pblock, loopvar, se.expr); + gfc_add_modify (pblock, loopvar, se.expr); gfc_init_se (&se, NULL); gfc_conv_expr_val (&se, c->iterator->end); @@ -1348,7 +1346,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type, /* Increase loop variable by step. */ tmp = fold_build2 (PLUS_EXPR, TREE_TYPE (loopvar), loopvar, step); - gfc_add_modify_expr (&body, loopvar, tmp); + gfc_add_modify (&body, loopvar, tmp); /* Finish the loop. */ tmp = gfc_finish_block (&body); @@ -1360,7 +1358,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type, gfc_add_expr_to_block (pblock, tmp); /* Restore the original value of the loop counter. */ - gfc_add_modify_expr (pblock, loopvar, tmp_loopvar); + gfc_add_modify (pblock, loopvar, tmp_loopvar); } } mpz_clear (size); @@ -2640,7 +2638,7 @@ gfc_trans_scalarized_loop_end (gfc_loopinfo * loop, int n, loopbody = gfc_finish_block (pbody); /* Initialize the loopvar. */ - gfc_add_modify_expr (&loop->code[n], loop->loopvar[n], loop->from[n]); + gfc_add_modify (&loop->code[n], loop->loopvar[n], loop->from[n]); exit_label = gfc_build_label_decl (NULL_TREE); @@ -2661,7 +2659,7 @@ gfc_trans_scalarized_loop_end (gfc_loopinfo * loop, int n, /* Increment the loopvar. */ tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, loop->loopvar[n], gfc_index_one_node); - gfc_add_modify_expr (&block, loop->loopvar[n], tmp); + gfc_add_modify (&block, loop->loopvar[n], tmp); /* Build the loop. */ tmp = gfc_finish_block (&block); @@ -3621,7 +3619,7 @@ gfc_array_init_size (tree descriptor, int rank, tree * poffset, /* Set the dtype. */ tmp = gfc_conv_descriptor_dtype (descriptor); - gfc_add_modify_expr (pblock, tmp, gfc_get_dtype (TREE_TYPE (descriptor))); + gfc_add_modify (pblock, tmp, gfc_get_dtype (TREE_TYPE (descriptor))); or_expr = NULL_TREE; @@ -3652,7 +3650,7 @@ gfc_array_init_size (tree descriptor, int rank, tree * poffset, } } tmp = gfc_conv_descriptor_lbound (descriptor, gfc_rank_cst[n]); - gfc_add_modify_expr (pblock, tmp, se.expr); + gfc_add_modify (pblock, tmp, se.expr); /* Work out the offset for this component. */ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, se.expr, stride); @@ -3669,11 +3667,11 @@ gfc_array_init_size (tree descriptor, int rank, tree * poffset, gfc_add_block_to_block (pblock, &se.pre); tmp = gfc_conv_descriptor_ubound (descriptor, gfc_rank_cst[n]); - gfc_add_modify_expr (pblock, tmp, se.expr); + gfc_add_modify (pblock, tmp, se.expr); /* Store the stride. */ tmp = gfc_conv_descriptor_stride (descriptor, gfc_rank_cst[n]); - gfc_add_modify_expr (pblock, tmp, stride); + gfc_add_modify (pblock, tmp, stride); /* Calculate the size of this dimension. */ size = fold_build2 (PLUS_EXPR, gfc_array_index_type, se.expr, size); @@ -3713,11 +3711,11 @@ gfc_array_init_size (tree descriptor, int rank, tree * poffset, var = gfc_create_var (TREE_TYPE (size), "size"); gfc_start_block (&thenblock); - gfc_add_modify_expr (&thenblock, var, gfc_index_zero_node); + gfc_add_modify (&thenblock, var, gfc_index_zero_node); thencase = gfc_finish_block (&thenblock); gfc_start_block (&elseblock); - gfc_add_modify_expr (&elseblock, var, size); + gfc_add_modify (&elseblock, var, size); elsecase = gfc_finish_block (&elseblock); tmp = gfc_evaluate_now (or_expr, pblock); @@ -3803,7 +3801,7 @@ gfc_array_allocate (gfc_se * se, gfc_expr * expr, tree pstat) gfc_add_expr_to_block (&se->pre, tmp); tmp = gfc_conv_descriptor_offset (se->expr); - gfc_add_modify_expr (&se->pre, tmp, offset); + gfc_add_modify (&se->pre, tmp, offset); if (expr->ts.type == BT_DERIVED && expr->ts.derived->attr.alloc_comp) @@ -4001,7 +3999,7 @@ gfc_trans_array_bounds (tree type, gfc_symbol * sym, tree * poffset, gfc_init_se (&se, NULL); gfc_conv_expr_type (&se, as->lower[dim], gfc_array_index_type); gfc_add_block_to_block (pblock, &se.pre); - gfc_add_modify_expr (pblock, lbound, se.expr); + gfc_add_modify (pblock, lbound, se.expr); } ubound = GFC_TYPE_ARRAY_UBOUND (type, dim); if (as->upper[dim] && !INTEGER_CST_P (ubound)) @@ -4009,7 +4007,7 @@ gfc_trans_array_bounds (tree type, gfc_symbol * sym, tree * poffset, gfc_init_se (&se, NULL); gfc_conv_expr_type (&se, as->upper[dim], gfc_array_index_type); gfc_add_block_to_block (pblock, &se.pre); - gfc_add_modify_expr (pblock, ubound, se.expr); + gfc_add_modify (pblock, ubound, se.expr); } /* The offset of this dimension. offset = offset - lbound * stride. */ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, lbound, size); @@ -4029,7 +4027,7 @@ gfc_trans_array_bounds (tree type, gfc_symbol * sym, tree * poffset, tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, ubound, tmp); tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, size, tmp); if (stride) - gfc_add_modify_expr (pblock, stride, tmp); + gfc_add_modify (pblock, stride, tmp); else stride = gfc_evaluate_now (tmp, pblock); @@ -4039,7 +4037,7 @@ gfc_trans_array_bounds (tree type, gfc_symbol * sym, tree * poffset, stride, gfc_index_zero_node); tmp = fold_build3 (COND_EXPR, gfc_array_index_type, tmp, stride, gfc_index_zero_node); - gfc_add_modify_expr (pblock, stride, tmp); + gfc_add_modify (pblock, stride, tmp); } size = stride; @@ -4112,7 +4110,7 @@ gfc_trans_auto_array_allocation (tree decl, gfc_symbol * sym, tree fnbody) if (sym->attr.cray_pointee) { if (TREE_CODE (GFC_TYPE_ARRAY_OFFSET (type)) == VAR_DECL) - gfc_add_modify_expr (&block, GFC_TYPE_ARRAY_OFFSET (type), offset); + gfc_add_modify (&block, GFC_TYPE_ARRAY_OFFSET (type), offset); gfc_add_expr_to_block (&block, fnbody); return gfc_finish_block (&block); } @@ -4125,11 +4123,11 @@ gfc_trans_auto_array_allocation (tree decl, gfc_symbol * sym, tree fnbody) /* Allocate memory to hold the data. */ tmp = gfc_call_malloc (&block, TREE_TYPE (decl), size); - gfc_add_modify_expr (&block, decl, tmp); + gfc_add_modify (&block, decl, tmp); /* Set offset of the array. */ if (TREE_CODE (GFC_TYPE_ARRAY_OFFSET (type)) == VAR_DECL) - gfc_add_modify_expr (&block, GFC_TYPE_ARRAY_OFFSET (type), offset); + gfc_add_modify (&block, GFC_TYPE_ARRAY_OFFSET (type), offset); /* Automatic arrays should not have initializers. */ @@ -4177,13 +4175,13 @@ gfc_trans_g77_array (gfc_symbol * sym, tree body) /* Set the offset. */ if (TREE_CODE (GFC_TYPE_ARRAY_OFFSET (type)) == VAR_DECL) - gfc_add_modify_expr (&block, GFC_TYPE_ARRAY_OFFSET (type), offset); + gfc_add_modify (&block, GFC_TYPE_ARRAY_OFFSET (type), offset); /* Set the pointer itself if we aren't using the parameter directly. */ if (TREE_CODE (parm) != PARM_DECL) { tmp = convert (TREE_TYPE (parm), GFC_DECL_SAVED_DESCRIPTOR (parm)); - gfc_add_modify_expr (&block, parm, tmp); + gfc_add_modify (&block, parm, tmp); } stmt = gfc_finish_block (&block); @@ -4278,7 +4276,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) TREE_USED (partial) = 1; tmp = gfc_conv_descriptor_stride (dumdesc, gfc_rank_cst[0]); tmp = fold_build2 (EQ_EXPR, boolean_type_node, tmp, gfc_index_one_node); - gfc_add_modify_expr (&block, partial, tmp); + gfc_add_modify (&block, partial, tmp); } else { @@ -4298,7 +4296,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) tmp = fold_build3 (COND_EXPR, gfc_array_index_type, tmp, gfc_index_one_node, stride); stride = GFC_TYPE_ARRAY_STRIDE (type, 0); - gfc_add_modify_expr (&block, stride, tmp); + gfc_add_modify (&block, stride, tmp); /* Allow the user to disable array repacking. */ stmt_unpacked = NULL_TREE; @@ -4332,7 +4330,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) } else tmp = stmt_packed != NULL_TREE ? stmt_packed : stmt_unpacked; - gfc_add_modify_expr (&block, tmpdesc, fold_convert (type, tmp)); + gfc_add_modify (&block, tmpdesc, fold_convert (type, tmp)); offset = gfc_index_zero_node; size = gfc_index_one_node; @@ -4359,7 +4357,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) gfc_conv_expr_type (&se, sym->as->lower[n], gfc_array_index_type); gfc_add_block_to_block (&block, &se.pre); - gfc_add_modify_expr (&block, lbound, se.expr); + gfc_add_modify (&block, lbound, se.expr); } ubound = GFC_TYPE_ARRAY_UBOUND (type, n); @@ -4373,7 +4371,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) gfc_conv_expr_type (&se, sym->as->upper[n], gfc_array_index_type); gfc_add_block_to_block (&block, &se.pre); - gfc_add_modify_expr (&block, ubound, se.expr); + gfc_add_modify (&block, ubound, se.expr); } /* Check the sizes match. */ @@ -4400,7 +4398,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) tmp = fold_build2 (MINUS_EXPR, gfc_array_index_type, dubound, dlbound); tmp = fold_build2 (PLUS_EXPR, gfc_array_index_type, tmp, lbound); - gfc_add_modify_expr (&block, ubound, tmp); + gfc_add_modify (&block, ubound, tmp); } /* The offset of this dimension. offset = offset - lbound * stride. */ tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, lbound, stride); @@ -4440,7 +4438,7 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) stmt_unpacked, stmt_packed); else tmp = (stmt_packed != NULL_TREE) ? stmt_packed : stmt_unpacked; - gfc_add_modify_expr (&block, stride, tmp); + gfc_add_modify (&block, stride, tmp); } } else @@ -4456,14 +4454,14 @@ gfc_trans_dummy_array_bias (gfc_symbol * sym, tree tmpdesc, tree body) ubound, tmp); tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, GFC_TYPE_ARRAY_STRIDE (type, n), tmp); - gfc_add_modify_expr (&block, stride, tmp); + gfc_add_modify (&block, stride, tmp); } } } /* Set the offset. */ if (TREE_CODE (GFC_TYPE_ARRAY_OFFSET (type)) == VAR_DECL) - gfc_add_modify_expr (&block, GFC_TYPE_ARRAY_OFFSET (type), offset); + gfc_add_modify (&block, GFC_TYPE_ARRAY_OFFSET (type), offset); gfc_trans_vla_type_sizes (sym, &block); @@ -4758,7 +4756,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) if (se->direct_byref) { /* Copy the descriptor for pointer assignments. */ - gfc_add_modify_expr (&se->pre, se->expr, desc); + gfc_add_modify (&se->pre, se->expr, desc); /* Add any offsets from subreferences. */ gfc_get_dataptr_offset (&se->pre, se->expr, desc, NULL_TREE, @@ -4991,7 +4989,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) /* Set the dtype. */ tmp = gfc_conv_descriptor_dtype (parm); - gfc_add_modify_expr (&loop.pre, tmp, gfc_get_dtype (parmtype)); + gfc_add_modify (&loop.pre, tmp, gfc_get_dtype (parmtype)); /* Set offset for assignments to pointer only to zero if it is not the full array. */ @@ -5060,11 +5058,11 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) from = gfc_index_one_node; } tmp = gfc_conv_descriptor_lbound (parm, gfc_rank_cst[dim]); - gfc_add_modify_expr (&loop.pre, tmp, from); + gfc_add_modify (&loop.pre, tmp, from); /* Set the new upper bound. */ tmp = gfc_conv_descriptor_ubound (parm, gfc_rank_cst[dim]); - gfc_add_modify_expr (&loop.pre, tmp, to); + gfc_add_modify (&loop.pre, tmp, to); /* Multiply the stride by the section stride to get the total stride. */ @@ -5089,7 +5087,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) /* Store the new stride. */ tmp = gfc_conv_descriptor_stride (parm, gfc_rank_cst[dim]); - gfc_add_modify_expr (&loop.pre, tmp, stride); + gfc_add_modify (&loop.pre, tmp, stride); dim++; } @@ -5106,14 +5104,14 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) { /* Set the offset. */ tmp = gfc_conv_descriptor_offset (parm); - gfc_add_modify_expr (&loop.pre, tmp, base); + gfc_add_modify (&loop.pre, tmp, base); } else { /* Only the callee knows what the correct offset it, so just set it to zero here. */ tmp = gfc_conv_descriptor_offset (parm); - gfc_add_modify_expr (&loop.pre, tmp, gfc_index_zero_node); + gfc_add_modify (&loop.pre, tmp, gfc_index_zero_node); } desc = parm; } @@ -5588,7 +5586,7 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl, { rank = c->as ? c->as->rank : 0; tmp = fold_convert (TREE_TYPE (dcmp), comp); - gfc_add_modify_expr (&fnblock, dcmp, tmp); + gfc_add_modify (&fnblock, dcmp, tmp); tmp = structure_alloc_comps (c->ts.derived, comp, dcmp, rank, purpose); gfc_add_expr_to_block (&fnblock, tmp); |