diff options
author | Tobias Schlüter <tobi@gcc.gnu.org> | 2008-02-24 17:43:23 +0100 |
---|---|---|
committer | Tobias Schlüter <tobi@gcc.gnu.org> | 2008-02-24 17:43:23 +0100 |
commit | 44855d8c09f755264f7fd7f86a343413e2edcd44 (patch) | |
tree | 405bd7396b605b64b780b51b408b0d9c87bcc36e /gcc/fortran/trans-decl.c | |
parent | faebccf9b6ec3f4bfdcc268fc55cf58c397bed6c (diff) | |
download | gcc-44855d8c09f755264f7fd7f86a343413e2edcd44.zip gcc-44855d8c09f755264f7fd7f86a343413e2edcd44.tar.gz gcc-44855d8c09f755264f7fd7f86a343413e2edcd44.tar.bz2 |
trans-array.c (gfc_conv_descriptor_data_get, [...]): Use fold_buildN instead of buildN.
* trans-array.c (gfc_conv_descriptor_data_get,
gfc_conv_descriptor_data_set_internal,
gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
gfc_conv_array_transpose, gfc_grow_array,
gfc_trans_array_constructor_subarray,
gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
gfc_conv_array_initializer, gfc_trans_array_bounds,
gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
gfc_get_dataptr_offset, gfc_conv_array_parameter,
gfc_trans_dealloc_allocated, get_full_array_size,
gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
instead of buildN.
* trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
gfc_conv_component_ref, gfc_conv_cst_int_power,
gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
* trans-common.c (create_common): Likewise.
* trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
Likewise.
* trans-const.c (gfc_conv_constant_to_tree): Likewise.
* trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
gfc_trans_integer_select, gfc_trans_character_select,
gfc_trans_forall_loop, compute_overall_iter_number,
gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
gfc_trans_deallocate): Likewise.
* trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
gfc_allocate_with_status, gfc_allocate_array_with_status,
gfc_deallocate_with_status): Likewise.
* f95-lang.c (gfc_truthvalue_conversion): Likewise.
* trans-io.c (set_parameter_const, set_parameter_value,
set_parameter_ref, set_string, set_internal_unit, io_result,
set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
* trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
gfc_generate_function_code): Likewise.
* convert.c (convert): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_conversion,
build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
gfc_conv_intrinsic_repeat): Likewise.
From-SVN: r132592
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r-- | gcc/fortran/trans-decl.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 8ca4d43..52393b4 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1,5 +1,5 @@ /* Backend function setup - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. Contributed by Paul Brook @@ -689,8 +689,8 @@ gfc_build_qualified_array (tree decl, gfc_symbol * sym) { tree size, range; - size = build2 (MINUS_EXPR, gfc_array_index_type, - GFC_TYPE_ARRAY_SIZE (type), gfc_index_one_node); + size = fold_build2 (MINUS_EXPR, gfc_array_index_type, + GFC_TYPE_ARRAY_SIZE (type), gfc_index_one_node); range = build_range_type (gfc_array_index_type, gfc_index_zero_node, size); TYPE_DOMAIN (type) = range; @@ -1729,9 +1729,8 @@ build_entry_thunks (gfc_namespace * ns) pushdecl (union_decl); DECL_CONTEXT (union_decl) = current_function_decl; - tmp = build2 (MODIFY_EXPR, - TREE_TYPE (union_decl), - union_decl, tmp); + tmp = fold_build2 (MODIFY_EXPR, TREE_TYPE (union_decl), + union_decl, tmp); gfc_add_expr_to_block (&body, tmp); for (field = TYPE_FIELDS (TREE_TYPE (union_decl)); @@ -1740,19 +1739,19 @@ build_entry_thunks (gfc_namespace * ns) thunk_sym->result->name) == 0) break; gcc_assert (field != NULL_TREE); - tmp = build3 (COMPONENT_REF, TREE_TYPE (field), union_decl, field, - NULL_TREE); - tmp = build2 (MODIFY_EXPR, - TREE_TYPE (DECL_RESULT (current_function_decl)), - DECL_RESULT (current_function_decl), tmp); + tmp = fold_build3 (COMPONENT_REF, TREE_TYPE (field), + union_decl, field, NULL_TREE); + tmp = fold_build2 (MODIFY_EXPR, + TREE_TYPE (DECL_RESULT (current_function_decl)), + DECL_RESULT (current_function_decl), tmp); tmp = build1_v (RETURN_EXPR, tmp); } else if (TREE_TYPE (DECL_RESULT (current_function_decl)) != void_type_node) { - tmp = build2 (MODIFY_EXPR, - TREE_TYPE (DECL_RESULT (current_function_decl)), - DECL_RESULT (current_function_decl), tmp); + tmp = fold_build2 (MODIFY_EXPR, + TREE_TYPE (DECL_RESULT (current_function_decl)), + DECL_RESULT (current_function_decl), tmp); tmp = build1_v (RETURN_EXPR, tmp); } gfc_add_expr_to_block (&body, tmp); @@ -1874,8 +1873,8 @@ gfc_get_fake_result_decl (gfc_symbol * sym, int parent_flag) break; gcc_assert (field != NULL_TREE); - decl = build3 (COMPONENT_REF, TREE_TYPE (field), decl, field, - NULL_TREE); + decl = fold_build3 (COMPONENT_REF, TREE_TYPE (field), + decl, field, NULL_TREE); } var = create_tmp_var_raw (TREE_TYPE (decl), sym->name); @@ -2430,7 +2429,7 @@ gfc_trans_auto_character_variable (gfc_symbol * sym, tree fnbody) /* Emit a DECL_EXPR for this variable, which will cause the gimplifier to allocate storage, and all that good stuff. */ - tmp = build1 (DECL_EXPR, TREE_TYPE (decl), decl); + tmp = fold_build1 (DECL_EXPR, TREE_TYPE (decl), decl); gfc_add_expr_to_block (&body, tmp); gfc_add_expr_to_block (&body, fnbody); @@ -3318,8 +3317,8 @@ gfc_generate_function_code (gfc_namespace * ns) types may be different for scalar default REAL functions with -ff2c, therefore we have to convert. */ tmp = convert (TREE_TYPE (DECL_RESULT (fndecl)), result); - tmp = build2 (MODIFY_EXPR, TREE_TYPE (tmp), - DECL_RESULT (fndecl), tmp); + tmp = fold_build2 (MODIFY_EXPR, TREE_TYPE (tmp), + DECL_RESULT (fndecl), tmp); tmp = build1_v (RETURN_EXPR, tmp); gfc_add_expr_to_block (&block, tmp); } |