aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2010-09-10 08:01:50 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2010-09-10 08:01:50 +0200
commit5d44e5c8398ca39f0cfdc33ff1470d17132b2af3 (patch)
tree46dfd2506be1556f07f9559109074d19c8c2de57 /gcc/fortran/trans.c
parent63d1822fccfef3fc2f35392386b894604cbca465 (diff)
downloadgcc-5d44e5c8398ca39f0cfdc33ff1470d17132b2af3.zip
gcc-5d44e5c8398ca39f0cfdc33ff1470d17132b2af3.tar.gz
gcc-5d44e5c8398ca39f0cfdc33ff1470d17132b2af3.tar.bz2
re PR fortran/45186 (Gfortran 4.5.0 emits wrong linenumbers)
2010-09-10 Tobias Burnus <burnus@net-b.de> PR fortran/45186 * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc, build4_stat_loc): New inline functions. (build1_loc, build2_loc, build3_loc, build4_loc): New macros. (build1_v, build2_v, build3_v, build4_v): Use input_location as locus. * trans-array.c (gfc_trans_scalarized_loop_end, gfc_conv_array_parameter): Replace build[1-4] by build[1-4]_loc. * trans.c (gfc_build_addr_expr, gfc_build_array_ref, gfc_finish_wrapped_block): Ditto. * trans-decl.c (gfc_init_default_dt, init_intent_out_dt): Ditto. * trans-expr.c (gfc_conv_missing_dummy, gfc_trans_alloc_subarray_assign, gfc_trans_zero_assign): Ditto. * trans-openmp.c (gfc_omp_clause_default_ctor, gfc_trans_omp_critical, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections gfc_trans_omp_single, gfc_trans_omp_task, gfc_trans_omp_workshare): Ditto. From-SVN: r164143
Diffstat (limited to 'gcc/fortran/trans.c')
-rw-r--r--gcc/fortran/trans.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 708b5d1..a608fb1 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -278,8 +278,8 @@ gfc_build_addr_expr (tree type, tree t)
tree type_domain = TYPE_DOMAIN (base_type);
if (type_domain && TYPE_MIN_VALUE (type_domain))
min_val = TYPE_MIN_VALUE (type_domain);
- t = fold (build4 (ARRAY_REF, TREE_TYPE (type),
- t, min_val, NULL_TREE, NULL_TREE));
+ t = fold (build4_loc (input_location, ARRAY_REF, TREE_TYPE (type),
+ t, min_val, NULL_TREE, NULL_TREE));
natural_type = type;
}
else
@@ -347,7 +347,8 @@ gfc_build_array_ref (tree base, tree offset, tree decl)
}
else
/* Otherwise use a straightforward array reference. */
- return build4 (ARRAY_REF, type, base, offset, NULL_TREE, NULL_TREE);
+ return build4_loc (input_location, ARRAY_REF, type, base, offset,
+ NULL_TREE, NULL_TREE);
}
@@ -1476,7 +1477,8 @@ gfc_finish_wrapped_block (gfc_wrapped_block* block)
result = block->init;
add_expr_to_chain (&result, block->code, false);
if (block->cleanup)
- result = build2 (TRY_FINALLY_EXPR, void_type_node, result, block->cleanup);
+ result = build2_loc (input_location, TRY_FINALLY_EXPR, void_type_node,
+ result, block->cleanup);
/* Clear the block. */
block->init = NULL_TREE;