diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2009-07-16 22:29:52 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2009-07-16 22:29:52 +0000 |
commit | db3927fb49c9f13a0da61a75d771f51dc7c45b92 (patch) | |
tree | e4de0ffc0a0ca77f35b03bf9e8a248a4b5735f6a /gcc/fortran/trans-stmt.c | |
parent | c32097d8b4fb21997c571cf6520431fa7d06090f (diff) | |
download | gcc-db3927fb49c9f13a0da61a75d771f51dc7c45b92.zip gcc-db3927fb49c9f13a0da61a75d771f51dc7c45b92.tar.gz gcc-db3927fb49c9f13a0da61a75d771f51dc7c45b92.tar.bz2 |
re PR c/40435 (Revision 148442 caused many regressions on trunk)
2009-07-17 Aldy Hernandez <aldyh@redhat.com>
Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 40435
* tree-complex.c, tree-loop-distribution.c,
tree.c, tree.h, builtins.c, fold-const.c, omp-low.c,
cgraphunit.c, tree-ssa-ccp.c, tree-ssa-dom.c,
gimple-low.c, expr.c, tree-ssa-ifcombine.c, c-decl.c,
stor-layout.c, tree-if-conv.c, c-typeck.c,
gimplify.c, calls.c, tree-sra.c, tree-mudflap.c,
tree-ssa-copy.c, tree-ssa-forwprop.c, c-convert.c, c-omp.c,
varasm.c, tree-inline.c, c-common.c,
c-common.h, gimple.c, tree-switch-conversion.c, gimple.h,
tree-cfg.c, c-parser.c, convert.c: Add location
argument to fold_{unary,binary,ternary}, fold_build[123],
build_call_expr, build_size_arg, build_fold_addr_expr,
build_call_array, non_lvalue, size_diffop,
fold_build1_initializer, fold_build2_initializer,
fold_build3_initializer, fold_build_call_array,
fold_build_call_array_initializer, fold_single_bit_test,
omit_one_operand, omit_two_operands, invert_truthvalue,
fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
combine_comparisons, fold_builtin_*, fold_call_expr,
build_range_check, maybe_fold_offset_to_address, round_up,
round_down.
objc/
* objc-act.c: Add location argument to all calls to
build_fold_addr_expr.
testsuite/
* gcc.dg/pr36902.c: Add column info.
* g++.dg/gcov/gcov-2.C: Change count for definition.
cp/
* typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
call.c, cvt.c, mangle.c: Add location argument to
fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
build_size_arg, build_fold_addr_expr, build_call_array,
non_lvalue, size_diffop, fold_build1_initializer,
fold_build2_initializer, fold_build3_initializer,
fold_build_call_array, fold_build_call_array_initializer,
fold_single_bit_test, omit_one_operand, omit_two_operands,
invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
fold_indirect_ref, combine_comparisons, fold_builtin_*,
fold_call_expr, build_range_check, maybe_fold_offset_to_address,
round_up, round_down.
fortran/
* trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
argument to fold_{unary,binary,ternary}, fold_build[123],
build_call_expr, build_size_arg, build_fold_addr_expr,
build_call_array, non_lvalue, size_diffop,
fold_build1_initializer, fold_build2_initializer,
fold_build3_initializer, fold_build_call_array,
fold_build_call_array_initializer, fold_single_bit_test,
omit_one_operand, omit_two_operands, invert_truthvalue,
fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
combine_comparisons, fold_builtin_*, fold_call_expr,
build_range_check, maybe_fold_offset_to_address, round_up,
round_down.
Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>
From-SVN: r149722
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r-- | gcc/fortran/trans-stmt.c | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 0e8ce67..6a1fb01 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -314,13 +314,14 @@ gfc_conv_elemental_dependencies (gfc_se * se, gfc_se * loopse, tmp = fold_build2 (MULT_EXPR, gfc_array_index_type, loopse->loop->from[n], tmp); offset = fold_build2 (MINUS_EXPR, gfc_array_index_type, - offset, tmp); + offset, tmp); } info->offset = gfc_create_var (gfc_array_index_type, NULL); gfc_add_modify (&se->pre, info->offset, offset); /* Copy the result back using unpack. */ - tmp = build_call_expr (gfor_fndecl_in_unpack, 2, parmse.expr, data); + tmp = build_call_expr_loc (input_location, + gfor_fndecl_in_unpack, 2, parmse.expr, data); gfc_add_expr_to_block (&se->post, tmp); /* parmse.pre is already added above. */ @@ -539,12 +540,14 @@ gfc_trans_pause (gfc_code * code) if (code->expr1 == NULL) { tmp = build_int_cst (gfc_int4_type_node, code->ext.stop_code); - tmp = build_call_expr (gfor_fndecl_pause_numeric, 1, tmp); + tmp = build_call_expr_loc (input_location, + gfor_fndecl_pause_numeric, 1, tmp); } else { gfc_conv_expr_reference (&se, code->expr1); - tmp = build_call_expr (gfor_fndecl_pause_string, 2, + tmp = build_call_expr_loc (input_location, + gfor_fndecl_pause_string, 2, se.expr, se.string_length); } @@ -574,12 +577,14 @@ gfc_trans_stop (gfc_code * code) if (code->expr1 == NULL) { tmp = build_int_cst (gfc_int4_type_node, code->ext.stop_code); - tmp = build_call_expr (gfor_fndecl_stop_numeric, 1, tmp); + tmp = build_call_expr_loc (input_location, + gfor_fndecl_stop_numeric, 1, tmp); } else { gfc_conv_expr_reference (&se, code->expr1); - tmp = build_call_expr (gfor_fndecl_stop_string, 2, + tmp = build_call_expr_loc (input_location, + gfor_fndecl_stop_string, 2, se.expr, se.string_length); } @@ -1614,7 +1619,8 @@ gfc_trans_character_select (gfc_code *code) else gcc_unreachable (); - tmp = build_call_expr (fndecl, 4, init, build_int_cst (NULL_TREE, n), + tmp = build_call_expr_loc (input_location, + fndecl, 4, init, build_int_cst (NULL_TREE, n), se.expr, se.string_length); case_num = gfc_create_var (integer_type_node, "case_num"); gfc_add_modify (&block, case_num, tmp); @@ -1741,7 +1747,7 @@ forall_make_variable_temp (gfc_code *c, stmtblock_t *pre, stmtblock_t *post) gfc_conv_subref_array_arg (&tse, e, 0, INTENT_IN); gfc_add_block_to_block (pre, &tse.pre); gfc_add_block_to_block (post, &tse.post); - tse.expr = build_fold_indirect_ref (tse.expr); + tse.expr = build_fold_indirect_ref_loc (input_location, tse.expr); if (e->ts.type != BT_CHARACTER) { @@ -2441,7 +2447,7 @@ allocate_temp_for_forall_nest_1 (tree type, tree size, stmtblock_t * block, tmp = gfc_do_allocate (bytesize, size, ptemp1, block, type); if (*ptemp1) - tmp = build_fold_indirect_ref (tmp); + tmp = build_fold_indirect_ref_loc (input_location, tmp); return tmp; } @@ -4020,7 +4026,7 @@ gfc_trans_allocate (gfc_code * code) if (expr->ts.type == BT_DERIVED && expr->ts.derived->attr.alloc_comp) { - tmp = build_fold_indirect_ref (se.expr); + tmp = build_fold_indirect_ref_loc (input_location, se.expr); tmp = gfc_nullify_alloc_comp (expr->ts.derived, tmp, 0); gfc_add_expr_to_block (&se.pre, tmp); } @@ -4063,7 +4069,8 @@ gfc_trans_allocate (gfc_code * code) dlen = gfc_get_expr_charlen (code->expr2); slen = fold_build2 (MIN_EXPR, TREE_TYPE (slen), dlen, slen); - dlen = build_call_expr (built_in_decls[BUILT_IN_MEMCPY], 3, + dlen = build_call_expr_loc (input_location, + built_in_decls[BUILT_IN_MEMCPY], 3, gfc_build_addr_expr (pvoid_type_node, se.expr), errmsg, slen); tmp = fold_build2 (NE_EXPR, boolean_type_node, stat, @@ -4197,7 +4204,8 @@ gfc_trans_deallocate (gfc_code *code) dlen = gfc_get_expr_charlen (code->expr2); slen = fold_build2 (MIN_EXPR, TREE_TYPE (slen), dlen, slen); - dlen = build_call_expr (built_in_decls[BUILT_IN_MEMCPY], 3, + dlen = build_call_expr_loc (input_location, + built_in_decls[BUILT_IN_MEMCPY], 3, gfc_build_addr_expr (pvoid_type_node, se.expr), errmsg, slen); tmp = fold_build2 (NE_EXPR, boolean_type_node, astat, |