diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2019-12-07 11:07:07 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2019-12-07 12:07:07 +0100 |
commit | 9c81750c5bedd7883182ee2684a012c6210ebe1d (patch) | |
tree | a3355f687262d05caae19a9ab28b2fba2c9745ac /gcc/fortran/trans-common.c | |
parent | b01d215df18ba753746a170125b883befe100d67 (diff) | |
download | gcc-9c81750c5bedd7883182ee2684a012c6210ebe1d.zip gcc-9c81750c5bedd7883182ee2684a012c6210ebe1d.tar.gz gcc-9c81750c5bedd7883182ee2684a012c6210ebe1d.tar.bz2 |
Fortran] PR 92793 - fix column used for error diagnostic
PR fortran/92793
* trans.c (gfc_get_location): Declare.
* trans.c (gfc_get_location): Define; returns column-corrected location.
(trans_runtime_error_vararg, gfc_trans_runtime_check,
gfc_generate_module_code): Use new function.
* trans-array.c (gfc_trans_auto_array_allocation): Likewise.
* trans-common.c (build_field, get_init_field, create_common): Likewise.
* trans-decl.c (gfc_build_label_decl, gfc_get_symbol_decl): Likewise.
* trans-openmp.c (gfc_trans_omp_reduction_list, gfc_trans_omp_clauses):
Likewise.
* trans-stmt.c (gfc_trans_if_1): Likewise.
From-SVN: r279075
Diffstat (limited to 'gcc/fortran/trans-common.c')
-rw-r--r-- | gcc/fortran/trans-common.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index 18ad60f..95d6395 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -282,7 +282,7 @@ build_field (segment_info *h, tree union_type, record_layout_info rli) unsigned HOST_WIDE_INT desired_align, known_align; name = get_identifier (h->sym->name); - field = build_decl (h->sym->declared_at.lb->location, + field = build_decl (gfc_get_location (&h->sym->declared_at), FIELD_DECL, name, h->field); known_align = (offset & -offset) * BITS_PER_UNIT; if (known_align == 0 || known_align > BIGGEST_ALIGNMENT) @@ -559,7 +559,7 @@ get_init_field (segment_info *head, tree union_type, tree *field_init, tmp = build_range_type (gfc_array_index_type, gfc_index_zero_node, tmp); tmp = build_array_type (type, tmp); - field = build_decl (gfc_current_locus.lb->location, + field = build_decl (gfc_get_location (&gfc_current_locus), FIELD_DECL, NULL_TREE, tmp); known_align = BIGGEST_ALIGNMENT; @@ -711,7 +711,7 @@ create_common (gfc_common_head *com, segment_info *head, bool saw_equiv) { tree var_decl; - var_decl = build_decl (s->sym->declared_at.lb->location, + var_decl = build_decl (gfc_get_location (&s->sym->declared_at), VAR_DECL, DECL_NAME (s->field), TREE_TYPE (s->field)); TREE_STATIC (var_decl) = TREE_STATIC (decl); |